Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Who knows about javascript

  • 17-07-2005 9:50pm
    #1
    Registered Users, Registered Users 2 Posts: 575 ✭✭✭


    Hey all

    It'd be great if someone could help. I have a javascript for CascadedDropdown Menu . The only prob with it is that it puts every link into the parent page .

    I want to be able to lunch links in new windows .


    http://ozeire.com/menu.txt



    The part i'm dealing with is


    // This is a vertical menu positioned 0px across and 22px down from its trigger, and is 80px wide.
    startMenu('mGet', true, 0, 22, 80, subM);
    // The URLs are set to # here, be sure to replace them with your path/file names or JS functions!
    // Also note how all the types are '', indicating these links open in the current frame.
    addItem('Visas', '../home/gethere.html', '');
    addItem('Banking', '../home/banking.html', '');
    addItem('Taxation', '../home/tax.html', '');
    addItem('Flights / Travel', '../home/flight.html', '', subM, 38);





    Thanks in advance


    Al


Comments

  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    For future reference - this is javascript, not Java. They are two completely diffetent things.

    Locate
    window.navigate(cmd)
    in your document. window.navigate() is a deprecated command for IE.

    Change this line to
    window.open(cmd, "newWin")

    Let me know if it works.


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    seamus wrote:
    They are two completely diffetent things.
    For now... Muh-ha-ha-ha-ha-ha-ha-ha...


  • Registered Users, Registered Users 2 Posts: 575 ✭✭✭Ozeire


    Done that and still doesn't seem to be working .

    I want some of the links to open in the parent window and some open in new windows .


  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    The script would seem to be set up to only open the links one way. You would need to edit the script to allow you to set the type of window for each link. I.e. you would need to edit the addItem() function to take four paremeters instead of three.


  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    in your AddItem() thing there is a empty ''at the end of each. Taking another value so try entering _blank inside these marks. eg:
    addItem('Taxation', '../home/tax.html', '_blank');

    Pure guess tbh. I'm not the best with Javascript


  • Advertisement
  • Moderators, Science, Health & Environment Moderators Posts: 9,035 Mod ✭✭✭✭mewso


    Again guessing but this is probably creating onclick events that set the document.location value which will not open in a new window. You can verify this by looking at the rendered script in the resulting html page. You might be better finding a menu that actually creates anchor links (<a href="etc.)

    http://www.dynamicdrive.com/dynamicindex1/index.html


  • Registered Users, Registered Users 2 Posts: 575 ✭✭✭Ozeire


    Its ok i got it to work

    addItem('6 & 12 Month Holiday Visas', 'window.open("http://www.insideoutdownunder.com")', 'js:', subM, 38);

    Thanks all for your help


Advertisement