Forums
This topic is locked
FORM FIELDS
Posted 19 Sep 2001 14:07:11
1
has voted
19 Sep 2001 14:07:11 Paul Rossiter posted:
I want to set the mouse cursor to be active in the first field of a page when it opens. At the moment I cannot get it to do this and my users are getting a bit p****d off because they automatically start typing and when they look up from the keyboard nothing's been entered(!). (I can't afford to get all my staff trained in touch typing so doing this would be of great assistance!!!)Replies
Replied 19 Sep 2001 19:10:05
19 Sep 2001 19:10:05 Joel Martinez replied:
wow, your users seem kind of crabby... but that is a really useful feature to add...
I don't know if there's a behavior for this, but you can accomplish it with this code...<pre id=code><font face=courier size=2 id=code><script language="javascript">
function focusField(textbox) {
txtbox.focus();
}
</script></font id=code></pre id=code>Then add this to the body tag<pre id=code><font face=courier size=2 id=code><body onLoad="focusField(document.formName.TextBoxName)"></font id=code></pre id=code>Hope that helps...
PS. if you get an error, mess with the case of the "Focus" method... I don't remember if it's focus, or Focus
Joel Martinez [ ]
----------
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/
I don't know if there's a behavior for this, but you can accomplish it with this code...<pre id=code><font face=courier size=2 id=code><script language="javascript">
function focusField(textbox) {
txtbox.focus();
}
</script></font id=code></pre id=code>Then add this to the body tag<pre id=code><font face=courier size=2 id=code><body onLoad="focusField(document.formName.TextBoxName)"></font id=code></pre id=code>Hope that helps...
PS. if you get an error, mess with the case of the "Focus" method... I don't remember if it's focus, or Focus
Joel Martinez [ ]
----------
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/