I have, say, 20 links on a page. Each link needs to bring up a different external page hosted on another server in an overlay.

Is there an easy way to dynamically change the src of an iFrame that appears in an overlay?

1 answer


If I'm understanding your question correctly, you should be able to do something like this (assuming the iframe has a "name" attribute of "inframe"):

<a href="http://www.google.com/" target="inframe">Google</a>

Answered almost 10 years ago by Michael Gorman