|
-
Dec 30th, 2003, 08:33 PM
#1
Thread Starter
Addicted Member
Simple question
hey guys,
can u guys give me the syntax for setting focus to a text box on the page load...? thx =)

Akababy.Net... Life Redefined!
-
Dec 30th, 2003, 11:12 PM
#2
Hi Baby,
You cant set focuse with ASP since it is processed serverside. But it is quite simple to accomplish with Client Side JavaScript.
Simply do the following
Code:
<HTML>
<HEAD>
<TITLE></TITLE>
<script language="javascript">
function SetFocus(id)
{
id.focus();
}
</script>
</HEAD>
<BODY onload="JavaScript:SetFocus(document.form1.t)">
<form name=form1>
<input type=textbox name=t><br>
<input type=textbox name=t2>
</form>
</BODY>
</HTML>
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Jan 1st, 2004, 08:35 PM
#3
Thread Starter
Addicted Member
thank you Danial you are of great help thx

Akababy.Net... Life Redefined!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|