I have a script that allows the user to enter a number into a text box and then click the button (type="button" not submit) and then it just updates a <div> with the calculated value. That all works fine. My problem is that if I just entered the number into the textbox and then I hit the enter key while my cursor is still inside the text box it refreshes the page instead of executing the javascript that it is supposed to. Originally I thought I had just made a stupid mistake and made it type="submit" instead of "button" but thats not it.
Any ideas? Thanks
Any ideas? Thanks