Open a Window in java script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mndprasad
    New Member
    • Jan 2008
    • 20

    #1

    Open a Window in java script

    Hi all,
    I am doing a project in jsp..where i need to open a window when some one clicks my menu item..

    my code is:

    [CODE=javascript]var menuItems = [

    ["<B>:: </B>Home","admin_ welcome.htm","" ,,,,,],
    ["<B>:: </B>Projects",,,, ,,],
    ["|sample1","s1. jsp",,,,,,],
    ["|sample2","s2. jsp",,,,,],
    ["|sample3","s3. jsp",,,,,,],
    ["<B>:: </B>sample4","s4. jsp",,,,,,],
    ["<B>:: </B>Logout","LogO ut.jsp","",""," ","_parent" ,,],

    ];[/CODE]

    what i need here is when user clicks sample4,then s4.jsp should open in new window..

    plz help me here..
    thanks in advance
    Last edited by gits; Jan 23 '08, 07:30 AM. Reason: added code tags
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Use window.open() to open a new window.

    menuItems[5][0] and menuItems[5][1] are the name and URL respectively.

    Comment

    Working...