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.
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Form focus on FP search 6
Lost Focus event in FP 4
listbox and set focus 1
Set focus 2
Set focus on controls of modeless form 4
Setting focus 2
Set focus to current console window ? 1
Detecting and setting focus 3

Back
Top