M
Mad Ape
I am trying to create a simple javascript - my first so go easy on me. I
want to have a script that selects the contents of a textbox when the
web page loads. I can not get what I have to work.
Please help me fix it. I think I may have the sequencing wrong but I
tried a bunch of stuff with no luck.
This code will all be put into a page with .php extension if that matters.
Thanks
The Mad Ape
www.tatumba.com
++++++++++++++++++++++++++++++++++++++++++++++++
<body onLoad = "focusIt()">
form action="" method="POST">
<input name="LOGIT" type="text" value="Some Text To Get Selected On Load
of HTML Page" size="60" />
<input type="submit" name="Submit" value="Wassup"
</form>
function focusIt()
{
var mytext = document.getElementById("LOGIT");
mytext.focus();
}
</script>
</body>
++++++++++++++++++++++++++++++++++++++++++++++++
want to have a script that selects the contents of a textbox when the
web page loads. I can not get what I have to work.
Please help me fix it. I think I may have the sequencing wrong but I
tried a bunch of stuff with no luck.
This code will all be put into a page with .php extension if that matters.
Thanks
The Mad Ape
www.tatumba.com
++++++++++++++++++++++++++++++++++++++++++++++++
<body onLoad = "focusIt()">
form action="" method="POST">
<input name="LOGIT" type="text" value="Some Text To Get Selected On Load
of HTML Page" size="60" />
<input type="submit" name="Submit" value="Wassup"
</form>
function focusIt()
{
var mytext = document.getElementById("LOGIT");
mytext.focus();
}
</script>
</body>
++++++++++++++++++++++++++++++++++++++++++++++++