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
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    "Help!" JavaScript Link Target

    Hi,

    I will try to be as precise as possible.

    Here is my issue:

    I have a website menu created with Javascript. It's a basic website navigating menu with dropdowns when you mouse over links that show the subpages under that root page.

    Anyway, the problem I'm trying to figure out is if there is any way to put a target attribute within the links in the menu. Here is a section of code below that I have for one of the links in the menu. The link is "Home" and the source of the link is "Alumni.htm". I want to put a target on the link to "mainFrame" so that when the link is selected the Alumni.htm page will open within a IFRAME I have further down the page.

    I basically want this:
    Code:
    <a href="Alumni.htm" target="mainFrame">
    but in the Javascript Below.

    Does anyone know how this can be accomplished?


    Code:
    Menu1=new Array("Home","Alumni.htm","",0,20,110);
    Thanks

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    We would need to see the rest of the code but from the looks of it you are making the noob mistake of having all of the menu created using javascript. There are better ways particularly the suckerfish drop down menus.

    http://alistapart.com/articles/dropdowns/

    Good luck.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks,

    I appreciate it.


  •  

    Posting Permissions

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