Difference between revisions of "Test/Forms Ajax Tester"
(warning label) |
(Re-upped from igem.org / improved fake form fields, added "username" data field) |
||
Line 1: | Line 1: | ||
<html> | <html> | ||
− | |||
− | |||
<p>This tool will help you make test AJAX requests to form.cgi.</p> | <p>This tool will help you make test AJAX requests to form.cgi.</p> | ||
Line 15: | Line 13: | ||
<li><label> <input type="checkbox"> Form name:</label> <input type="text" id="form_name"></li> | <li><label> <input type="checkbox"> Form name:</label> <input type="text" id="form_name"></li> | ||
<li><label> <input type="checkbox"> Team ID: </label><input type="text" id="team_id"></li> | <li><label> <input type="checkbox"> Team ID: </label><input type="text" id="team_id"></li> | ||
+ | <li><label> <input type="checkbox"> Username: </label><input type="text" id="username"></li> | ||
<li><label> <input type="checkbox"> Judge Username: </label><input type="text" id="judge_username"></li> | <li><label> <input type="checkbox"> Judge Username: </label><input type="text" id="judge_username"></li> | ||
<li><label> <input type="checkbox"> Sub form: </label><input type="text" id="sub_form"></li> | <li><label> <input type="checkbox"> Sub form: </label><input type="text" id="sub_form"></li> | ||
Line 22: | Line 21: | ||
<br /> | <br /> | ||
<ul id="fake-form-fields"> | <ul id="fake-form-fields"> | ||
− | <li> <input type="checkbox"> Field name: <input type="text" class="field_name"> / Answer: <input type="text" class="answer"></li> | + | <li> <input type="checkbox" id="field1"> <label for="field1">Field name:</label> <input type="text" class="field_name"> <label for="field1">/ Answer:</label> <input type="text" class="answer"></li> |
− | <li> <input type="checkbox"> Field name: <input type="text" class="field_name"> / Answer: <input type="text" class="answer"></li> | + | <li> <input type="checkbox" id="field2"> <label for="field2">Field name:</label> <input type="text" class="field_name"> <label for="field2">/ Answer: </label><input type="text" class="answer"></li> |
</ul> | </ul> | ||
Line 107: | Line 106: | ||
$("#request-data").on("focus", "input[type='text']", function(event) { | $("#request-data").on("focus", "input[type='text']", function(event) { | ||
$(this).siblings("label").children("input[type='checkbox']").prop("checked", true); | $(this).siblings("label").children("input[type='checkbox']").prop("checked", true); | ||
+ | }); | ||
+ | $("#fake-form-fields").on("focus", "input[type='text']", function(event) { | ||
+ | $(this).siblings("input[type='checkbox']").prop("checked", true); | ||
}); | }); | ||
$("#go").click(function(event) { | $("#go").click(function(event) { |
Revision as of 21:46, 26 February 2015
This tool will help you make test AJAX requests to form.cgi.
- /
- URL:
Info:
Output: