I've got a form, where i put information in with greasemonkey. The form got no ID or Class...
When you manauly put something in the inputbox, and press enter, it get's submitted and you're off... I want to achief the same with jquery.
Changing the value's of the input boc is not the problem, but submitting.
Ive got the following code;
e = jQuery.Event("keypress");
e.which = 13;
e.keyCode = 13;
$("#inputy").focus();
$("#inputy").trigger(e);
But this doesn't work... So how does i simulate an enter in the inputbox with the ID inputy?
Greetz TWCrap
So you want to submit the form? You can try:
On every key-up we check for the
Enter
key. If theEnter
key was released we then find the closest form and submit it.