View Full Version : Double-Target Hyperlink? -Somewhat Urgent-

08-15-2005, 08:44 AM
Hi, I'm new to Javascript, and so far know next to nothing at it, yet I need to add a thing to my site which requires a double-target hyperlink. I figured this would probably need Javascript, which is why I'm posting here. The first frame with the most important link is called mainFrame, while the second frame (actually an iframe) is called details. They need to go to two seperate URL's when the link-image is clicked. I appreciate any assistance, thank you for your time.

08-15-2005, 11:40 AM
Is 'mainFrame' also an iframe? Is 'details' in the same frame as the page with the link? Is 'mainFrame'? Anyways, if 'mainFrame' is an actual frame (or an iframe in the same frame or on the same html page as the link) and 'details' is an iframe in the same frame or on the same html page as the link, this will do nicely:

<a href="some.htm" target="mainFrame" onclick="window.details.location.href='someother.htm';return true;"><img src="link.jpg" border="0"></a>

08-16-2005, 12:14 AM
Umm, there's a frameset with two frames, one on top, one on bottom (the menu), in the menu part there's a small iframe which needs to be targetted at the same time as the menu changes the main frame.

08-16-2005, 08:36 AM
Should work then, if not:

08-16-2005, 09:15 AM
Moderators/staff can lock this topic now, after patiently searching 14 different search engines I was able to find my answer. Thanks for your help jscheuer1, the problem was that it said error on page when I clicked the link, and it didn't target the 'details' iframe.

08-16-2005, 03:02 PM
My code tested out here in a simple demo I constructed. What was your final arrangement?

08-17-2005, 09:40 AM
Uhh, instead of windows.details part I used windows.parent[#], the number is the number of the frame (first frame in the code would be 0, second would be 1, etc.). The reason why it probably didn't work was because I had the frame resizer script from dynamic drive enabled on it, probably interfered or something, that's all I can guess...