Javascript changing url/src of iframe

Hello all,

I have a small problem this my javascript. I want it to change the url/src of an iframe I have on the screen, but I can’t find anything that works.

Could someone please have a look?

var newiframepath = "http://newURL.htm";
frames['iframeName'].location.replace(newiframepath);

I also have this (again doesn’t work):

var newiframepath = "http://newURL.htm";
iframeName.location.replace = (newiframepath);

Can anyone help?

sap

window.frames["myIframe"].location.[COLOR=Blue]href[/COLOR] = "somepage.htm"

or

document.getElementById("iframeID").src = "somepage.htm"

The bottom one can run into security problems if the page in the iframe isn’t from your domain.