PDA

Click to See Complete Forum and Search --> : Hyperlink - Easy one


josmond
Apr 27th, 2001, 07:34 AM
How do you set focus to a hyperlink when web page opens??
:confused:

ubunreal69
Apr 27th, 2001, 07:38 AM
mate, i dont think it is possible but if it is then cool :cool:

smelf
Apr 27th, 2001, 10:25 AM
i think thats impossible, you have to click on a hyperlink you cannot focus like you can on a text box. as below
document.LoginForm.Username.focus();

sorry about that mate,
if you hear differently then respect to who ever figures it out.

monte96
Apr 27th, 2001, 11:20 AM
umm.... of course it's possible... same way you would do it to any other element:


<HTML>
<HEAD>
<SCRIPT language=javascript>
function window_onload()
{
MyLink.focus();
}
</SCRIPT>
</HEAD>
<BODY onload="window_onload()">
<A name=MyLink id=MyLink HREF="Home.htm">Click Here</A>
</BODY>
</HTML>