Setting initial focus in form

  • Thread starter Thread starter Augie Dawg
  • Start date Start date
A

Augie Dawg

I've searched the web for a way to force FP to set a particular text box in
a form to get the initial focus, and found the following recommendation:

------------------------------------
Put this in your body tag....

onLoad="document.FormName.FormElementName.select()"

Replace FormName with your Form's name.

Replace FormElementName with the name of the Form Item
you want to have initial focus.
--------------------------------------


When I do this, I get an error indicating that "the object is null or not an
object".

I've double-checked spelling, etc., and can't figure out why I'm getting
this error. QUESTION: Is there another way to assign the focus to a
particular text box in a form?

Thanks,
A.D.
 
There are 2 parts to: onLoad="document.FormName.FormElementName.select()"
FormName - the name of your form in the page
FormElementName - the name of the field you want to set focus to

Note: if using form field validation FP sets the form name to FrontPage_Form1

--




| I've searched the web for a way to force FP to set a particular text box in
| a form to get the initial focus, and found the following recommendation:
|
| ------------------------------------
| Put this in your body tag....
|
| onLoad="document.FormName.FormElementName.select()"
|
| Replace FormName with your Form's name.
|
| Replace FormElementName with the name of the Form Item
| you want to have initial focus.
| --------------------------------------
|
|
| When I do this, I get an error indicating that "the object is null or not an
| object".
|
| I've double-checked spelling, etc., and can't figure out why I'm getting
| this error. QUESTION: Is there another way to assign the focus to a
| particular text box in a form?
|
| Thanks,
| A.D.
|
|
|
 
Back
Top