Click to See Complete Forum and Search --> : iframe content change onclick


orkko
12-14-2003, 07:40 PM
first please take a look at this webpage...
http://www.absolutzero.com/green/index2.html
click on gallery and a new window will pop up. I don't want that to happen. Instead I need my iframe source to change when I click the link, instead of opening another html file in the browser.
I want the change to happen in the <iframe src="/directory">
I know this is mostly html but I don't think html would allow me to dynamically change the content in the table that contains the <iframe src=""> . I figured javascript would be the only way.
Click on the link below to see what I mean...
http://www.absolutzero.com/slice3a.jpg

Thanks ahead for your help.

orkko
12-14-2003, 08:13 PM
in a attempt to be even more clear on what I need help with I will write a simple code here to show you what I mean.

<table>

<tr>

<td><img src="button.gif"></img>onclick( find and change iframe src to news.html) <-- this is what I want to do -->
Click this link and it will open the site news in the next table cell while the page remains the same</td>

\\ once this link above is clicked the iframe source file below changes to news.html

<td><iframe src="changes depending on where the javascript above will tell it to go get the source"> </iframe></td>

</tr>

</table>

orkko
12-14-2003, 08:51 PM
nevermind, I found out how to do it...
thanks anyway.

joakman
01-12-2004, 03:24 PM
I am having the same problem. So how did you resolve it, if you don't mind telling?

kaizer
01-17-2004, 04:14 AM
when you create an iframe, you have to give it a name: <iframe name="myIframe" ></iframe>
When you click on an image or link, you give that name as the target: <a target="myIframe" href="myImage"><img src="myImage.jpg></a>
Then the result appears into the target.

hope this helps