hey guys,
can u guys give me the syntax for setting focus to a text box on the page load...? thx =)
Printable View
hey guys,
can u guys give me the syntax for setting focus to a text box on the page load...? thx =)
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>
thank you Danial :) you are of great help thx