View Full Version : onchange refresh iframe

05-15-2008, 03:15 PM
i wish to refresh an iframe called 'imagespage'
when someone changes the image option pull down menu.

i have this line which i believe needs changing but do not know what is the correct format of the onchange part.

<select name="imageoption" onchange="window.open(this,'imagespage')">

this is my iframe which shows the correct image previously selected.
but when they change the pull down menu it shows an error saying that the page can not be found.

<iframe id="imagespage" name="imagespage" src="./imagepage.php"></iframe>

05-15-2008, 03:24 PM
Try this:

<select name="imageoption" onchange="top.frames['framename'].location='pagename'">

Also, is the imagepage in the same directory as the page that is calling the javascript?