Javascript with a URL?

Discussion in 'JavaScript' started by dsirois1, Oct 20, 2006.

  1. #1
    Can I use a URL to upen a page and specify an include to load in one of its named Iframes. For example:

    From page1.htm I want to have a link called "test1" to load /includes/include1.htm in an Iframe id="iframe1" on another page called page2.htm

    Next to link "test1" I also want a link called "test2" that will do the same thing, only it will load /include/include2.htm in id="frame1" again on page2.htm

    Any ideas?

    This is the script that I am using to load Iframes from within.

    function loadIframe(iframeName, url) {
    if ( window.frames[iframeName] ) {
    window.frames[iframeName].location = url;
    return false;
    }
    else return true;
    }
     
    dsirois1, Oct 20, 2006 IP