Opening a new window in javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jay123
    New Member
    • Sep 2008
    • 121

    Opening a new window in javascript

    Hello All,
    I have 3 linkbuttons, depending upon which one user clicks ( + another different criteria's), i create a string (path).

    like
    Code:
     var detailedresults="window.open('abc.aspx?ReportPath=/def/ghi','ReportWindow','status=yes,location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes');";
    and i am struck after this.

    as you can see i have a path in variable detailedresults , what should i do or is their any function in javascript where i can pass this path to open in new window.

    Any help will be appreciated

    Regards
    Jay
  • JKing
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    #2
    You don't need the quotes around your call to window.open.

    Comment

    • jay123
      New Member
      • Sep 2008
      • 121

      #3
      Sorted..

      Silly me.. need to use
      Code:
      window.open(URL, 'WindowName', window specification)
      google: window.open in javascript and you'll get thousand examples..

      Comment

      • jay123
        New Member
        • Sep 2008
        • 121

        #4
        Thanks JKing..

        Comment

        Working...