Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: setting focus to form control after validating


Message #1 by "Don Woo" <dwoo@r...> on Fri, 22 Dec 2000 16:11:45 -0000
Try it onBlur event. It might work.
Arghya


>From: "Donald Soar" <donald_soar@m...>
>Reply-To: "javascript" <javascript@p...>
>To: "javascript" <javascript@p...>
>Subject: [javascript] Re: setting focus to form control after validating
>Date: Sat, 23 Dec 2000 19:12:02 -0600
>
>docoment.all.controlName.focus()
>                     or
>document.formName.inputFieldName.focus()
>
>This seems to work for me.
>I hope it helps you!
>
>----- Original Message -----
>From: Don Woo
>Sent: Friday, December 22, 2000 6:31 PM
>To: javascript
>Subject: [javascript] setting focus to form control after validating
>
>
>After validating a form control, I would like to reset the focus to the
>control if the input is invalid. I tried using the code below, but it
>doesn't work.
>
>        document.Params.ParamInput[i-1].focus;
>        (document.form.controlarray)
>
>The validating code is called from the controls onchange event.
>
>
>
>
>
>

--- 
NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development, 
Web Development, Networking & Communications, and Hardware & Systems.  
Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
---
You are currently subscribed to javascript as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-javascript-$subst('Recip.MemberIDChar')@p2p.wrox.com

  Return to Index