I could use some help. I've been looking at this all day and cannot
come up with a solution

I am using the same routine on these 5 input fields. If I type in a
character on one of these fields and press enter, it works as expected
I get an error alert and focus on the field. However if I type in a
character and tab out of the field I get an alert error but the focus
is on the next field. I guess the blur event takes it to the next
field.

Can someone tell me what I need to do to get the focus working
correctly here

Here is my event related code

 Event.observe('oldidratio','change',validateNumberChange);
 Event.observe('cashpershare','change',validateNumberChange);
 Event.observe('proration','change',validateNumberChange);
 Event.observe('newid1ratioentry','change',validateNumberChange);
 Event.observe('newid1fmv','change',validateNumberChange);

Here is the function

   function validateNumberChange(){
         var numericField = $F(this);
       if(IsNumber(numericField,true)){
          return true;
       }
       else {
         $(this).focus();
         alert("invalid number");
         return false;
       }


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to