Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple hyperlinks

Status
Not open for further replies.

daybase

Technical User
Dec 13, 2002
115
GB
Is it possible to have hyperlinks to two URLS from one click? I have a page with two target frames and most of the time I update one or the other but I have one application which would be really effective if I could update frame 1 with one URL and frame 2 with a different one all from the click of one button - any ideas please?
 
Sorry my javascript is weak to say the least so please excuse the lame questions but how would I use this to load say 1.htm into frame a and 2.htm into frame b?
 
if you have the following HTML, I'll leave you to complete the corect definition for the frameset :

<frameset>
<frame name="headerFrame">
<frame name="leftFrame">
<frame name="mainFrame">
</frameset>

then in the frame mainFrame you would have the script shown above and this could be called form a link as follows :

<a href="#" onclick="2URLs('1.htm','2.htm');">click me</a>

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005
 
But what if your visitors have Javascript switched off? Then they won't be able to follow this link at all.

Congratulations, you have found one of the many, many sucky things about frames. I'm surprised anybody is still using them in the 21st century. Ho hum, if you're stuck with using frames, a solution to this problem would be to write a new frameset document with the two pages you need, and link to that.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Thank you all - in the end I opted for an <a href= link plus an onClick event to give a picture two links.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top