PDA

Click to See Complete Forum and Search --> : How can I refresh the IFRAME


wernerh
Jan 17th, 2001, 09:17 AM
How can I refresh a IFRAME.
What I am trying to do is to have a drop down box(<SELECT>) on a page, with a With a <IFRAME> directly below it.
On the ONCHANGE event of the drop down box, I want to reload the page in the IFRAME, so that it dynamically updates according to the selected item in the drop down box?

Or any other ideas on how to dynamically change fields on a page, that is read from a database according to a selection of a drop down box?

Frustrated!!!!

Clunietp
Jan 17th, 2001, 09:43 AM
This will work, but then you get into the cross frame security/scripting issue once you navigate to a different page. This would work fine when all of the pages are on the same server (probably), but you can't access the document when its not part of the same site, therefore you cannot replace its contents.....

<html>
<body>

<select id="cboURL" onchange="frmIFrame.document.location.replace(cboURL.value);">
<option value="http://www.microsoft.com">Microsoft.com
<option value="http://www.vbforums.com">VB Forums
<option value="http://www.netscape.com">Netscape.com
</select>

<iframe id="frmIFrame" src="about:blank"></iframe>

</body>
</html>