PDA

View Full Version : DHTML window links



rayzun
07-24-2005, 10:24 PM
Im using the DHTML script to show some flash files, instead of adding links to the page I would like to just switch the IFrame window href...
http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow.htm

my idea is not working:

<div id="dwindowcontent" style="height:100%">
<iframe id="cframe" src="" width=100% height=100%></iframe>
</div><a href="http://yahoo.com" target="cframe">YaHoo</a>
</div>

2 problems are occuring:
1) the Iframe disapears after click the link first time.
2) click the link a second time and a completely new window opens, when I m trying to target the iframe window

any ideas why this is???
// Im a newbie

dbldee
08-13-2007, 10:25 PM
your code may be incorrect
try

<a href="#" onclick="cframe.load('iframe', 'http://yahoo.com', 'Yahoo'); return false">Yahoo</a>