Forum Moderators: open
Is there a way to do this:
While entering numbers in a textfield, my form is submitted. This is so that the numbers that i enter will be displayed on a text area beside it, as i entered it (in the same form).
I have tried onkeyup="form.submit(); focus()" to bring the focus back to the textfield. This didnt work. The form gets submitted but the textfield didnt get focus.
Is there a way to achieve this? or there's no way to do this? help!
When a form is submitted, the current document will unload and the document returned by the server will be loaded by the browser. So it is useless to have any script after form.submit(); as it simply will not be executed.
Maybe you need to re-evaluate the logic in your script?