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
    Apr 2007
    Posts
    49
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Cleanest Way to Pop-Up

    I am trying to find the most code-effective way to make a pop-up window. That is, I want to use the least amount of code possible to specify a new window with no address bar, no status bar, no scroll bar, specified height/width etc.

    Any help much appreciated.

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    You can't turn off the address bar or status bar as modern browsers don't allow it. Any height/width specification may or may not work depending on individual browser settings.

    window.open('page.htm','_blank','width=250,height=260,scrollbars=no');
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New Coder
    Join Date
    Apr 2007
    Posts
    49
    Thanks
    10
    Thanked 0 Times in 0 Posts
    I should have worded it differently. I do not wish to turn them off, just make them not visible. I have seen this code before but do not know what it looks like in context. Is it like this...

    <a href="javascript.window.open('page.htm','_blank','width=250,height=260,scrollbars=no') />

    I apologize for the noob questions, I am quite new to javascript.
    Last edited by colindunn; 04-18-2007 at 11:11 PM.


  •  

    Posting Permissions

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