View Full Version : One button..two links.
10-14-2006, 06:03 AM
Okay I'm assuming to the best of my knowladge to pull this off I would use something to the extent of a mouseOver with an OnClick in java script, but I have one issue with java..if it's not cut and paste..I suck at it..so here goes.
I have two Iframes. One on top, one below.
The one on top shows an image.
The one below shows information.
When they click on a link to change the information, I also want that link to change the image in the iframe above.
10-14-2006, 06:14 AM
<a href="linktoinfo.html" target="nameofbottomframe" onclick="parent.frames['nameoftopframe'].location='someotherpage.html'">Two Links</a>
10-14-2006, 07:30 AM
Alright, I tested it out, and it's not targeting the first link to content, it's opening a new window all together.
I put up the test at
10-14-2006, 10:47 AM
That coding is for actual frames not IFrames which is what I'm using. I found this [http://www.samisite.com/test-csb2nf/id82.htm]in reference finally, aparently if you want to do this in IFrames you have to use java.
But even using their code I can't get mine to work >.< just says error on page when I click the link
Error: 'parent.FRAME1.location' is null or not an object
And upon further investigation it seems like doing this in IFrames is more of a pain in the arse than it's worth..but I know it can be done and functionally so..however with the magnitude of this site, I'm not sure if the hassle will be worth it.
10-14-2006, 03:38 PM
What I gave you would work, you just have to understand what a name of an frame or iframe really is. It seems that you don't. Your second iframe code has name="main" but so does your first one so your second iframe needs to be
<iframe width="150" height="315" src="content.html" name="main2" id="main2" border="0" frameborder="0" scrolling="auto" allowtransparency="true">
<iframe width="150" height="315" src="content.html" name="main" id="main2" border="0" frameborder="0" scrolling="auto" allowtransparency="true">
Now what I gave you would work IF you used the right iframe names which you didn't.
<a href="linktoinfo.html" target="main" onclick="parent.frames['main2'].location='someotherpage.html'">Two Links</a>
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.