View Full Version : Linking to an iframe on a different page


Carrie
07-06-2006, 05:50 PM
I have searched all over the internet for a solution to this problem, but I have been unable to find something that works. I'm hoping someone here can help me with this! :)

On the following web page, I am using an inline frame for including a downloads database which is located at a different url.

http://www.twistedrct.com/v2/downloads.php

Here is the iframe code that I am using:

<iframe src="http://www.twistedrct.com/v2/filedb/" name="filedb" width="675" height="1000" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="auto" allowtransparency="true">Sorry, your brower doesn't support iframes.</iframe>

In the menu on the left side (under the "Downloads" header), when linking to different categories in the database to keep them within the iframe, I am using the following code:

<a href="http://www.twistedrct.com/v2/filedb/category.php?id=1" target="filedb">RCT 1</a>

Everything works fine on the page where the actual iframe is located. However, my problem occurs when I try the same linking process on a page where the iframe is not located. Instead when the link is clicked, it opens in a new window or does nothing at all. I'm guessing this is happening because the iframe is located on a different page.

http://www.twistedrct.com/v2/index.php

Is it possible to get this to work using a different code on the pages where the iframe is not located? I've heard of using a javascript to make this work, but I have been unable to find one that solves my problem.

Any help will be greatly appreciated. I hope I explained everything correctly. Thanks!

pb&j
07-06-2006, 09:25 PM
it would open a new window considering it cannot find any spot called "filedb". if it does nothing, thats probably because it already has a window called filedb open and nothing has changed.

you may have to... open a new window and assign a name to it using javascript, then using javascript again, have the link find that window, then find the "filedb" iframe in that window, then open the link in it. perhaps ask this question in the javascript forum.

Carrie
07-07-2006, 01:32 PM
Can someone please move this thread to the javascript forum then? I don't want to double post. Thanks! :)