Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: navigation

  1. #1
    New Coder
    Join Date
    Oct 2002
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question navigation

    I am working on a small site and i wanted to know if you can use 2 functions within some javascript?

    I am using iFrames to drive the navigation and need to change out the navigation and the content onClick. Here is what I am using for the script:

    function MM_clickMenu(targ,selObj,restore){ //v3.0
    eval(targ+".location='"+selObj+"'");
    }

    and the link:

    <a href="company/nav_company.html" onClick="MM_clickMenu('parent.content_iframe','company/company.html',1)" onMouseOver="MM_swapImage('company','','images/company_on.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="images/company_off.gif" alt="COMPANY" name="company" width="74" height="22" border="0"></a>

    So what I want to do is within the MM_clickMenu I want to change out 2 different iFrames, but can't seem to get it to work.

    There is an alpha version of the site up to test:

    http://www.twelve02.com/clients/ttt/10_10_03

    I guess the best example of what I am trying to do is when you are on the homepage and you click to the company section, you get a different nav. Then, when you click the main TTT logo it changes the content_iFrame but not the navigation_iFrame and I need to change both.

    Confused?

    Tom

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,043
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Code:
    function MM_clickMenu(url,target,url2,target2){
     window.open(url, target);
     window.open(url2, target2); 
     return false;
    }
    ...
    <a href="company/nav_company.html" target="content_iframe" onClick="return MM_clickMenu(this.href, this.target, 'otherpage.html', 'othertarget')">Company</a>

  • #3
    New Coder
    Join Date
    Oct 2002
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks glenngv, that did the trick.

    Much appreciated.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •