Skip to content
Myr

index.html

This file

Path

examples/jqueryexample/templates/index.html

33 lines · 822 bytes · HTML

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 3fdcefb point at it.

Merge pull request #625 from soulseekah/masterKenneth Reitzbefore adoption3fdcefb

lines 1–33why, one step back
1{% extends "layout.html" %}
2{% block body %}3<script type=text/javascript>4 $(function() {5 var submit_form = function(e) {6 $.getJSON($SCRIPT_ROOT + '/_add_numbers', {7 a: $('input[name="a"]').val(),8 b: $('input[name="b"]').val()9 }, function(data) {10 $('#result').text(data.result);11 $('input[name=a]').focus().select();12 });13 return false;14 };1516 $('a#calculate').bind('click', submit_form);1718 $('input[type=text]').bind('keydown', function(e) {19 if (e.keyCode == 13) {20 submit_form(e);21 }22 });2324 $('input[name=a]').focus();25 });26</script>27<h1>jQuery Example</h1>28<p>29 <input type=text size=5 name=a> +30 <input type=text size=5 name=b> =31 <span id=result>?</span>32<p><a href=# id=calculate>calculate server side</a>33{% endblock %}