Source

htraf-packaging / htraf / demo / examples10 / slots.html

<!DOCTYPE html>
<html>
<head>
    <title>On-page linking and slots demo</title>
    <script type="text/javascript" src="/-/htraf/htraf.js"></script>
    <link type="text/css" rel="stylesheet" href="../css/htraf-02.css"/> 
</head>
<body>
    <h3>Select School</h3>
    <select id="school" data-htsql="/school{code, name}"></select>
    <h3>Departments</h3>
    <script id="department" data-htsql="/department?school=$school"
            data-ref="school"></script>
    <table id="department_table" data-bind="department">
    </table>
    <p>
        <span>Selected Department: </span>
        <em data-bind="department_table" data-slot="name"></em>
        <script id="d" data-bind="department_table" data-slot="code"></script>
        <br/>
        <span>Count of Courses in Selected Department: </span>
        <strong data-htsql="/department{count(course)}?code=$d" data-ref="d">
        </strong>
    </p>

</body>
</html>