Browse files

click to submit

  • Loading branch information...
1 parent f8b638c commit 1f1778f1229eb88bd61e3684b97dc7196b078cce @ptarjan committed May 31, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 index.html
View
6 index.html
@@ -80,8 +80,7 @@
<form method="POST" action="/">
<textarea id="yaml" class="yaml" name="yaml">{{ yaml }}</textarea>
<div>
- <input type="submit" value="Convert YAML" />
- to
+ Output:
<input type="radio" name="type" id="type_json" value="json"
{% ifequal type "json" %}checked="checked"{% endifequal %}
/><label for="type_json">json</label>
@@ -142,6 +141,9 @@
$('#yaml').keyup(function() {
$("form").submit();
});
+$('input:radio[name=type]').click(function() {
+ $("form").submit();
+});
$("form").submit(function(ev) {
var inputData = {yaml: $("#yaml").val(), type: $('input:radio[name=type]:checked').val() };

0 comments on commit 1f1778f

Please sign in to comment.