Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    64
    Thanks
    25
    Thanked 0 Times in 0 Posts

    Javascript window.open help

    hey guys, im kinda new to js but i want to have a popup login page, right now it goes to google but it doesnt seem to work quite right, have this code

    Code:
    <div id="admin"><a href="javascript:window.open('http://www.google.com','newWin','width=600,height=300,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');" >Admin login</a></div>
    what it does is it pops up google, but with the html page changes, it takes me to a black page with [object window] displayed..

    when i have
    Code:
    <div id="admin"><a href="javascript:window.open('http://www.google.com','newWin','width=600,height=300,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'),_blank;");>Admin login</a></div>
    the _blank at the end... it works the way i want it BUT the error console in firefox complains about it and if it complains in firefox no question it wont work in IE

    can anyone help
    Last edited by johnish; 08-15-2008 at 07:55 AM.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Try
    Code:
    <div id="admin"><a href="http://google.com" onclick="window.open(this.href,'newWin','width=600,height=300,left=0,top=0,toolbar=0,location=0,scrollbars=0,statusbar=0,resizable=0,fullscreen=0');return false">Admin login</a></div>
    Last edited by _Aerospace_Eng_; 08-15-2008 at 08:02 AM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • Users who have thanked _Aerospace_Eng_ for this post:

    johnish (08-15-2008)

  • #3
    New Coder
    Join Date
    Jun 2008
    Posts
    64
    Thanks
    25
    Thanked 0 Times in 0 Posts
    thanks so much makes perfect sense


  •  

    Posting Permissions

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