Blog  |   Sitemap  |   Search  |   Language:  eng рус
Home
JavaScript GUI FrameworkExamplesXHTML 1.0 examples

SPI navigation

In this example the page content is loaded asynchronously without entire page refresh. Such a technic could be useful when loading tree fragment, message body etc. unloading server from entire page generation.

Source code

<script type="application/ample+xml"> <p> <a href="/share/examples/xhtml/content1.xml" target="#example_navigation">link 1</a> :: <a href="/share/examples/xhtml/content2.xml" target="#example_navigation">link 2</a> :: <a href="/share/examples/xhtml/content3.xml" target="#example_navigation">link 3</a> </p> <div id="example_navigation"></div> </script>

SPI form submit

In this example form is submited without the entire page refresh. In case of votation implementation such a technic could save traffic and the interface reaction.

Source code

<script type="application/ample+xml" xmlns:aml="http://www.amplesdk.com/ns/aml"> <form action="../form/" method="POST" target="#example_form"> <table> <tbody> <tr> <td style="width:60px">Имя</td> <td><input type="text" name="Name" value="Michael"/></td> </tr> <tr> <td style="vertical-align:top">Sex</td> <td><input type="radio" name="Sex" id="male" value="Male" checked="checked"/> <label for="male">Male</label><br /> <input type="radio" name="Sex" id="female" value="Female" /> <label for="female">Female</label></td> </tr> <tr> <td></td> <td><input type="submit" value="Send"/></td> </tr> </tbody> </table> </form> <br /> <div id="example_form"></div> </script>