Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Window.open Maximise/Minimise

Window.open Maximise/Minimise

Scheduled Pinned Locked Moved Web Development
testingbeta-testinghelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tonymathewt
    wrote on last edited by
    #1

    I have coded a page to pop up a new window in the following way: window.open("testing.htm","now","height=350,width=250,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=1,toolbar=0,z-lock=0"); Clicking the button that opens the window while the window is currently open will not bring an additional window but, it will overwrite(not sure what action its doing) the values in the controls like text boxes. And not only that the window also goes minimised. Is there a way to bring it back maximised? Please help.:|

    S 1 Reply Last reply
    0
    • T tonymathewt

      I have coded a page to pop up a new window in the following way: window.open("testing.htm","now","height=350,width=250,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=1,toolbar=0,z-lock=0"); Clicking the button that opens the window while the window is currently open will not bring an additional window but, it will overwrite(not sure what action its doing) the values in the controls like text boxes. And not only that the window also goes minimised. Is there a way to bring it back maximised? Please help.:|

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      If you want to open a new window, use "_blank" as the name. If you're ok re-using the existing window but just wish to bring it to the foreground, call the focus() method on the object returned from window.open():

      var win = window.open(...);
      win.focus();

      BTW - generally, you can just avoid referencing options you do not want instead of explicitly setting them to 0.

      ----

      ...the wind blows over it and it is gone, and its place remembers it no more...

      T 1 Reply Last reply
      0
      • S Shog9 0

        If you want to open a new window, use "_blank" as the name. If you're ok re-using the existing window but just wish to bring it to the foreground, call the focus() method on the object returned from window.open():

        var win = window.open(...);
        win.focus();

        BTW - generally, you can just avoid referencing options you do not want instead of explicitly setting them to 0.

        ----

        ...the wind blows over it and it is gone, and its place remembers it no more...

        T Offline
        T Offline
        tonymathewt
        wrote on last edited by
        #3

        Thank you very much shog One more question is it possible to check whether a window with a particular name already exist or not without using the reference to that window?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups