Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Setting focus

Posted 31 Jan 2004 20:49:42
1
has voted
31 Jan 2004 20:49:42 Chris Munnings posted:
In DMX, can anyone tell me how to set the focus on a text box when the page opens (ie the cursor is in the box automatically). I have a search page and two forms (add/amend record) all of which work fine and would really like to just get the cursor in without the user having to click into the box....
Thanks
Werther

Replies

Replied 31 Jan 2004 23:12:04
31 Jan 2004 23:12:04 Dave Thomas replied:
in your opening body tag

<pre id=code><font face=courier size=2 id=code> &lt;body onLoad="FormName.TextBoxName.focus()"&gt;</font id=code></pre id=code>

change FormName to the name of your form
change TextBoxName to the name of your textbox.

thats it.



Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
Replied 05 Nov 2005 15:17:43
05 Nov 2005 15:17:43 Rachel Steadman replied:
Ok. I am using a template for this form.
I can't edit the body tag.. any sugguestions?

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
in your opening body tag

<pre id=code><font face=courier size=2 id=code> &lt;body onLoad="FormName.TextBoxName.focus()"&gt;</font id=code></pre id=code>

change FormName to the name of your form
change TextBoxName to the name of your textbox.

thats it.



Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote><b></b><font face='Verdana'></font id='Verdana'>

Ltdarling
www.webaholics.ca
Replied 06 Nov 2005 00:15:14
06 Nov 2005 00:15:14 Jeremy Conn replied:
Use 'Notepad' to edit the file for the BODY tag changes.

<b>Jeremy Conn</b>
www.conncreativemedia.com
DWMX2004 | ASP/VB | Access/SQL2000

Reply to this topic