May 8, 2002 #1 travmak Programmer Joined Apr 26, 2002 Messages 133 Location US I'm trying to automaticaly place a curser in a textbox in my form when the page loads. I don't know how. Please help.
I'm trying to automaticaly place a curser in a textbox in my form when the page loads. I don't know how. Please help.
May 8, 2002 #2 theocraticmind Programmer Joined Apr 19, 2002 Messages 318 Location CA add this to you body tag: onLoad="text_box_name.focus()" Upvote 0 Downvote
May 8, 2002 Thread starter #3 travmak Programmer Joined Apr 26, 2002 Messages 133 Location US I tried it and it didn't work. here is my body tag <body onLoad="fname.focus()"> here is input tag. <input type="textbox" name="fname" value = "<%= request.form("fname"%>"> Upvote 0 Downvote
I tried it and it didn't work. here is my body tag <body onLoad="fname.focus()"> here is input tag. <input type="textbox" name="fname" value = "<%= request.form("fname"%>">
May 8, 2002 #4 theocraticmind Programmer Joined Apr 19, 2002 Messages 318 Location CA it seems not to work in NS. maybe thats why, what browser are you using? Upvote 0 Downvote
May 9, 2002 Thread starter #5 travmak Programmer Joined Apr 26, 2002 Messages 133 Location US IE 6 Upvote 0 Downvote
May 9, 2002 #6 NEVERSLEEP Programmer Joined Apr 14, 2002 Messages 667 Location CA Code: <body onLoad="document.formname.inputname.focus()"> --------------------------------------- someone knowledge ends where someone else knowledge starts Upvote 0 Downvote
Code: <body onLoad="document.formname.inputname.focus()"> --------------------------------------- someone knowledge ends where someone else knowledge starts
May 9, 2002 Thread starter #7 travmak Programmer Joined Apr 26, 2002 Messages 133 Location US You got to it before I did. I just figured it out. Thanks for the help Upvote 0 Downvote
May 9, 2002 #8 theocraticmind Programmer Joined Apr 19, 2002 Messages 318 Location CA strange though...what i posted worked in my copy of IE6 Upvote 0 Downvote
May 9, 2002 #9 crazyboybert Programmer Joined Jun 27, 2001 Messages 798 Location GB was your text box in a form? if not that would be fine else you would have to reference the form first.... Upvote 0 Downvote
was your text box in a form? if not that would be fine else you would have to reference the form first....
May 9, 2002 #10 theocraticmind Programmer Joined Apr 19, 2002 Messages 318 Location CA ahh, thats why. Upvote 0 Downvote