Is it possible to use JavaScript to automatically press the Enter key when a textfield's value is changed? I'm guessing I would need to call the function using onChange="functionexample".
After some research I found out the the map number for the Enter key is 13. I think this is the number JavaScript needs, I could be wrong.
I have a form which has a section to choose a door number, each numeral is charged at £2.00. I have a script that calculates the amount of digits and that value is placed in a textfield.
I also have another textfeild that shows the total value of the order, but the problem is that the total value won't update when the amount of digits changes. If you click in the field with the amount of digits and press enter it updates the total value.
i ask because pressing enter usually triggers a form submit or onchange event.
if that's the case, you can simply call form.submit() or input.onchange() - no reason to fake key presses...
in other words, just do what enter does, don't do enter.
post the code if you need a hand.
__________________ my site (updated 5/13) STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.6% IE9:9.8% IE10:10%