Log in

View Full Version : Iframe Script Modify



stevan
03-12-2006, 04:49 PM
I use this I frame script

<td height="20" align="center" valign="top" bgcolor="#E8F6FC"><IFRAME name=stbbox src="/specials.php" width="687" height="200">
<p>&nbsp;</p>
</IFRAME></td>

I want to be able to have links that change the iframe location how would i code the link

Thxs Steve

jscheuer1
03-12-2006, 05:19 PM
That's not really a script, rather HTML code, a fine point really but worth noting. As HTML code goes, it could be better formed but, at least it should be valid in most browsers if not to spec for the w3c. To answer your question, all you need is a link that targets the iframe by name, ex:


<a href="somepage.htm" target="stbbox">Some Page</a>

By the way, your iframe html would be better like so:


<td height="20" align="center" valign="top" style="background-color:#E8F6FC;color:#000;">
<iframe name="stbbox" src="/specials.php" width="687" height="200">
<p>Your browser doesn't support the iframe feature of this page, please upgrade.</p>
</iframe></td>