Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Java script
Message
From
28/04/2000 00:55:22
 
 
To
28/04/2000 00:09:58
Amit Abhangrao
Charmi Software Exports
Mumbai, India
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Miscellaneous
Thread ID:
00364330
Message ID:
00364343
Views:
11
Mallari,

>I would like to set foucs on a hyperlink in a html page wheever it is opened. How can I do it?

You can put some embedded JavaScript in the BODY tag of your page and have it set focus to one of the links in the zero-based links collection of the page.

Let's say you have a page with four links. The are numbered internally as 0-3. If you wanted to set focus to the third link, you would refer to it as "document.links(2)".

Cut the following code, remove the extra spaces I have put in the tags to fool the UT parser, and save it to "linktest.htm". Double-click it and you will get a page with 4 links, with focus set to the third one. If the user presses ENTER he will go to the UT.
< HTML >
< BODY ONLOAD="document.links(2).focus()" >
Some text< br >
< a href="http://www.microsoft.com" >Link 0 - Microsoft< /a >< br >
< a href="http://www.oracle.com" >Link 1 - Oracle< /a >< br >
< a href="http://www.levelextreme.com" >Link 2 - UT< /a >< br >
< a href="http://www.yahoo.com" >Link 3 - Yahoo< /a >< br >
Some more text.
< /BODY >
< /HTML >
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Reply
Map
View

Click here to load this message in the networking platform