SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Dec 2008
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    opening page in a new window

    i have a menu script whcih displays menu on mouse over

    it works fine

    only thing i want to know is how do i open any particular page in a new window& pass paramters

    ealier i was having a href instead of menu so had used target=_blank

    currently when the menu option is clicked the new page opens in same window & no parameters are passed

    here is the menu option

    mm_menu_0113121624_0.addMenuItem("Employee details", "location='EMPDETAILS.aspx?type=E'");


    i need to open EMPDETAILS.aspx in anew window & also pass parametr

  2. #2
    SitePoint Addict
    Join Date
    Apr 2011
    Posts
    266
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    'To open a new window with JavaScript, you can use the window.open('url') ; i think this method must be addapted in your addMenuItem() function.
    Free: Web Programming Courses HTML, CSS, Flash
    Web Programming: AJAX Course and PHP-MySQL Course video Lessons
    Good JavaScript and jQuery course for beginners

  3. #3
    SitePoint Guru
    Join Date
    Dec 2008
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i knw that fr openiong a new window it is window.open(url)
    but how di i implement in the above script line & also passing parameters
    syntax for adding window.open in location

  4. #4
    SitePoint Addict
    Join Date
    Apr 2011
    Posts
    266
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    Try this:
    Code:
    mm_menu_0113121624_0.addMenuItem("Employee details", "open('EMPDETAILS.aspx?type=E')");
    If not works, see in the code of the addMenuItem() function how it uses its two parameters, maybe in its code must be made modifications, to use open() instead of "location=".
    Free: Web Programming Courses HTML, CSS, Flash
    Web Programming: AJAX Course and PHP-MySQL Course video Lessons
    Good JavaScript and jQuery course for beginners


Bookmarks

Posting Permissions

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