You need a name on your form, <cfform action="DaveActionForm.cfm" name="myForm">
Then put myform in the js, document.myform.yardage_ticket_no.focus() On 4/12/06, David Elliott <[EMAIL PROTECTED]> wrote: > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 > Transitional//EN" > "http://www.w3.org/TR/html4/loose.dtd"> > <html> > <head> > <meta http-equiv="Content-Type" content="text/html; > charset=iso-8859-1"> > <title>Dave's Query</title> > <script language="JavaScript"> > > window.onload = > document.yardage_ticket_no.yardage_ticket_no.focus(); > > </script> > </head> > > > <body> > > > <cfform > action="DaveActionForm.cfm"> > Please enter yardage ticket number: > <cfinput type="text" Name= "yardage_ticket_no"> > <input type="submit" Value = "Submit" > > > > > </cfform> > </body> > </html> > > --- David Elliott <[EMAIL PROTECTED]> wrote: > > > None of the suggestions work for me, but here is the > > code for the entire page...remember, I am just > > learning coldfusion so don't laugh yourself sick... > > > > Dave > > > > > > > > --- Ryan Guill <[EMAIL PROTECTED]> wrote: > > > > > javascript code: > > > > > > window.onload = > > > document.myformname.myforminput.focus(); > > > > > > where myformname is the name="" of the form tag > > and > > > myforminput is the > > > id (i think, it may be name="") of the form > > element > > > you want to focus > > > to. > > > > > > On 4/12/06, David Elliott > > <[EMAIL PROTECTED]> > > > wrote: > > > > Hi all, > > > > > > > > just an easy question probably, I wrote my first > > > two > > > > pages yesterday and need to add something else > > to > > > > them. Unfortunately, I don't have my 'book' > > with > > > me > > > > but I would like the cursor to appear inside > > this > > > one > > > > and only text box when the page opens up. > > > > > > > > I guess VBA & access has spoiled me some.... > > > > > > > > Any help greatly appreciated, > > > > > > > > Dave > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237572 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54