you don't put the name of the file in there.  you use the NAME attribute of
the FORM tag.

ex.


<FORM NAME="fred" ...>
<INPUT NAME="UserId" ...>
</FORM>

...

</BODY>
<Script>
  document.fred.UserId.focus()
</script>
</HTML>

btw, JS is case sensitive.

chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com



-----Original Message-----
From: Paige Chandler [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 31, 2000 8:42 PM
To: CF-Talk
Subject: Re: Manipulating Cursor Position In Applications


Hello Jann,

It appears that you've answered a question I didn't even know how to ask
yet. But I can't quite get it to work.  Would you please look at the code
below and tell me what is wrong with it? "CVS3WP02.cfm" is the web page and
"UserId" is the loggon Id field which I would like to receive focus upon the
page loading. TIA.

Regards,

Paige

</BODY>
<Script>
  document."CVS3WP02.cfm.UserId".focus()
</script>
</HTML>

----- Original Message -----
From: "Jann VanOver" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, October 31, 2000 5:13 PM
Subject: RE: Manipulating Cursor Position In Applications


> I have found many cases when this doesn't work.  I've often gotten errors
> that look like the "onLoad" handler was run before the page finished
> loading. (error says form or field not found). I do NOT trust the "onLoad"
> handler.  In cases like this, I've put the focus statement at the end of
the
> document.
>   <html>
>    ...
>   <body>
>   </body>
>   <script>
>     document.formname.fieldname.focus()
>   </script>
>   </html>
>
> -----Original Message-----
> From: Evan Lavidor [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 31, 2000 12:35 PM
> To: CF-Talk
> Subject: RE: Manipulating Cursor Position In Applications
>
>
> <body onLoad="document.formname.fieldname.focus();">
>
> > -----Original Message-----
> > From: t nelson [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 31, 2000 2:02 PM
> > To: CF-Talk
> > Subject: Manipulating Cursor Position In Applications
> >
> >
> > Hello All,
> >
> > I have a slight problem on my hands. I am trying to make the
> > cursor default
> > to the beginning of my input fields. For example if a user opens up a
> > <cf_form> page, I want them to be able to begin inputting their
> > data without
> > having to use their mouse to move their cursor into position.
> >
> > Any ideas out there?
> >
> >
> >
_________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.
> >
> > Share information about yourself, create your own public profile at
> > http://profiles.msn.com.
> >
> > ------------------------------------------------------------------
> > ------------------------------
> > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> > Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
> > or send a message with 'unsubscribe' in the body to
> > [EMAIL PROTECTED]
> --------------------------------------------------------------------------
--
> --------------------
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send
a
> message with 'unsubscribe' in the body to
[EMAIL PROTECTED]
> --------------------------------------------------------------------------
----------------------
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send
a message with 'unsubscribe' in the body to
[EMAIL PROTECTED]
>

----------------------------------------------------------------------------
--------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]

------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to