<form onsubmit="submit(); return false;" name="text" id="form" method="get">
<input type="feild" style="font-size: 150%;" id="field" name="field" value=""
onSubmit="this.value='';"/>
<input type="button" id="add" style="font-size: 150%;" value=" Add tally to score "/>
<input type="submit" value="submit" style="visibility:hidden" />
If I change "submit();" to "alert('here');" it calls the alert function perfectly. Why does it not call the submit function?
I want the function to be called when the user presses enter. http://jsfiddle.net/kaninepete/JsAr4/
note: The button on the side is for a different purpose, and not part of the problem. edit More work, trying to follow Christians example has gotten me here http://jsfiddle.net/kaninepete/MGxNG/
I don't see why this is different than his example! All I get is "{"error": "Please use POST request"}" and his works perfectly.