apologies in advanced if I use the wrong terminology or if this is obvious to solve. I'm trying to expand on this;
<script type="text/javascript">
function SetSrc()
{
document.getElementById("myIframe").src = document.getElementById("iframelink").value;
}
</script>
To allow multiple src links to be loaded with different buttons as in this
Html:
<iframe id="myIframe" src="page1.html" width="900" height="600" scrolling="no" frameborder="0"></iframe>
<table>
<tr>
<td><button value="page1.html" id="iframelink" onclick="SetSrc()"><p>image1</p><img src="thumb1.jpg" title=""/></button></td>
<td><button value="page2.html" id="iframelink" onclick="SetSrc()"><p>image2</p><img src="thumb2.jpg"/></button></td>
<td><button value="page3.html" id="iframelink" onclick="SetSrc()"><p>image3</p><img src="thumb3.jpg"/></button></td>
</tr>
</table>
I've put the first link into the iframe element(?) as I want the page to start with a page loaded into the iframe.
I'm using this to load images for a gallery in which I'm also using a toggle_visibility to show/hide categories the buttons are placed into and a jQuery zoom script within the page the iframe links to. The script as it is works fine to load from page1.html to another (i.e. page2.html) and doesn't seem to conflict with the other zoom or toggle scripts.