SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot plan9's Avatar
    Join Date
    Jul 2004
    Location
    Portugal
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Newbie stuff window.open

    I have a asp.net button that was supposed to open a popup window that I use javascript window.open, but I have a small problem


    the code that I use is:


    window.open('opemp.aspx',width='300', height='300')


    It opens the window all right but the windows doesn't has the mentioned size of 300 per 300, can anyone point me what i'm doing wrong.


    Thanks

  2. #2
    SitePoint Enthusiast
    Join Date
    Mar 2006
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The window.open method takes in three parameters: the target url, a name for the window, and options for configuring the window. The third parmater takes all options as one string.

    So in your above example you would be looking at something more like:

    window.open('opemp.aspx','','width=300, height=300');

    You can find full documentation on the window.open method at
    http://www.w3schools.com/htmldom/met_win_open.asp

    Hope that helps,

    NickJ

  3. #3
    SitePoint Zealot plan9's Avatar
    Join Date
    Jul 2004
    Location
    Portugal
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks now it works



    Quote Originally Posted by NickJ
    The window.open method takes in three parameters: the target url, a name for the window, and options for configuring the window. The third parmater takes all options as one string.

    So in your above example you would be looking at something more like:

    window.open('opemp.aspx','','width=300, height=300');

    You can find full documentation on the window.open method at
    http://www.w3schools.com/htmldom/met_win_open.asp

    Hope that helps,

    NickJ


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
  •