Click to See Complete Forum and Search --> : iframes


ashers
03-18-2004, 11:27 AM
I've got 2 iframes in on a page, one of them contains links, how do I set it up so when you click on a link the page opens in the other iframe.

Thanks

Vladdy
03-18-2004, 11:46 AM
Originally posted by ashers
I've got 2 iframes in on a page,<snip/>
My condolences.
Lose frames and free yourself from many headaches.

TheBearMay
03-18-2004, 12:02 PM
Working from memory, something like:



function newPage(URL){
window.open(URL, "contentFrame");
}

<iframe id="menuFrame" src=....
<iframe id="contentFrame" ...


...should be close.

TheBearMay
03-18-2004, 12:06 PM
Something like

document.getElementById("contentFrame").src=newURL;

may work also....

Paul Jr
03-18-2004, 08:40 PM
I'm pretty sure you could make good use of the target attribute (http://www.w3.org/TR/REC-html40/present/frames.html#h-16.3).