KingG
10-19-2003, 03:57 PM
Would anyone know why this won't work properly? When I change the ...HREF="javaScript:void(0)" onClick="javaScript:change(1)"... part in the link to just ...HREF="javaScript:change(1)"... it display's the page in the IFrame without having to refresh it (the page in the IFrame).
<HTML>
<Head>
<Script>
var temp="";
function change(g) {
if (g==1) {
temp="<IFRAME Width='100%' Height='100%' SRC='http://www.htmlgoodies.com/'></IFRAME>";
dispInfo.innerHTML=temp;
}
}
</Script>
</Head>
<Body>
<A onMouseOver="window.status='HTMLGoodies.com'; return true;" onMouseOut="window.status=''; return true;" HREF="javaScript:void(0)" onClick="javaScript:change(1)">HTML Goodies</A>
<Span ID="dispInfo"></Span>
</Body>
</HTML>
<HTML>
<Head>
<Script>
var temp="";
function change(g) {
if (g==1) {
temp="<IFRAME Width='100%' Height='100%' SRC='http://www.htmlgoodies.com/'></IFRAME>";
dispInfo.innerHTML=temp;
}
}
</Script>
</Head>
<Body>
<A onMouseOver="window.status='HTMLGoodies.com'; return true;" onMouseOut="window.status=''; return true;" HREF="javaScript:void(0)" onClick="javaScript:change(1)">HTML Goodies</A>
<Span ID="dispInfo"></Span>
</Body>
</HTML>