Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: onBlur fires after submit???


Message #1 by "Greg Dunn" <greg.dunn@n...> on Wed, 24 Apr 2002 22:36:13
I have the opposite problem. I have an onChange event for my text box (have 
you tried that one?). If the users enters/changes text but then clicks the 
button to save data the onchange fires but the code behind the button does 
not.
Any ideas?

Joe



>From: "Greg Dunn" <greg.dunn@n...>
>Reply-To: "javascript" <javascript@p...>
>To: "javascript" <javascript@p...>
>Subject: [javascript] onBlur fires after submit???
>Date: Wed, 24 Apr 2002 22:36:13
>
>Hi:
>
>I have a JSP in which I have a form where a user enters a date.  I have
>date validation code attached to the field which is set to fire on the
>field's onBlur event.  The validation works great, however, if the user
>enters an invalid date and then hits their ENTER key without doing
>anything else in between the form is submitted with the invalid
>information.  As I look at the screen I can see the date changing but I
>get errors on my form handler page that I would normally see when invalid
>dates are submitted.  It's as if the onBlur happens after the onSubmit
>when the user doesn't blur, and hits ENTER.  Is that true?  What good is
>that?  Is there another event I should be using?  TIA.
>
>Greg
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


  Return to Index