View Full Version : Stupid question

08-06-2007, 06:35 PM
Ok this is a stupid question but I am drawing a blank and im sure it is HTML related and not JS. Anyway what I am trying to remember is, how do I set the cursor to be in a text box in a form when the page loads?
Thanks alot for the help

08-06-2007, 07:36 PM
Hi there wayne3503,

does this help...

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script type="text/javascript">
window.onload=function() {


<form action="#">
<input type="text"/>


08-06-2007, 08:12 PM
OMG coot can I not get rid of you? Not that I want to, this is crazy8 ;) thanks coot....again

08-06-2007, 08:23 PM
Hi there wayne3503 a.k.a. crazy8,

...can I not get rid of you?
You could try putting out a contract on me? :)
Don't you know anyone from the mob?


08-06-2007, 08:26 PM
actually...in highschool i knew a student who was in russsian mob....anyway thank you for the help ill give it a try and see if it helps. It does look like what i think I need. The sad thing is I have done it before and cant find the code where I thought I had used it.
Though I thought it was something that got inserted into the <body> tag. Guess I was wrong...:D

08-06-2007, 08:42 PM
Hi there crazy Wayne,

I thought it was something that got inserted into the <body> tag. Guess I was wrong.
No, you were not wrong.
It is just better practice to remove to remove javascript event handlers from the markup. ;)


p.s. I will have to keep my open for Russians from now on. Don't seem to get that many in my neck of the woods, though. ;)

08-07-2007, 12:29 PM
We don't want to Russia, but if you Moscow.................