Thread Closed  Post Thread 

Page reloading when hitting enter in textbox, not executing code
Author Message
chaneguye
Member



Posts: 125
Group: Registered
   
Cash: 0.00 Donate
Page reloading when hitting enter in textbox, not executing code

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


Rosetta Stone Chinese
Rosetta Stone Arabic
09-17-2011 02:07 PM
Send the author a private message Visit authors website Find all posts by this author Quote this message in a reply

Thread Closed  Post Thread 


Similar Threads
Thread: Author Replies: Last Post
Anything wrong with this code? clerisy 0 01-23-2012 06:13 PM
how to generate graphs from an ASP page ? fianajio 0 12-14-2011 01:49 PM
locate and retrieve the elements of a Web page fianajio 0 12-14-2011 01:43 PM

View a Printable Version | Send this Thread to a Friend | Subscribe to this Thread | Add Thread to Favorites
Rate This Thread:
Forum Jump: