hiding window.open

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akg
    New Member
    • Jan 2007
    • 19

    hiding window.open

    Hi friends,
    I am opening a popup window with window.open method. I want to hide it, someting like visible=false. is there some property or method available which solve this purpose.

    Thanks,
    Amit
  • mrhoo
    Contributor
    • Jun 2006
    • 428

    #2
    You cannot open a new window with javascript that is hidden, positioned off screen, or smaller than a minimum size.

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Originally posted by akg
      Hi friends,
      I am opening a popup window with window.open method. I want to hide it, someting like visible=false. is there some property or method available which solve this purpose.

      Thanks,
      Amit
      Why do you want to hide the window? Can you not just close it and open it again?

      Comment

      • akg
        New Member
        • Jan 2007
        • 19

        #4
        I am opening a url (asp.net page) from window.open which I am resizing if the loaded url document is bigger or smaller than the opened window, but my user didn't liked this resizing of the window. so, I thought if i could open the window with hide attribute set initially and after resizing if I could display it then users will not see the resizing effect.

        any suggestions ?

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          You don't need to resize the window, you can open the window the correct size in the first place.
          Code:
          window.open('yourpage.asp','','width=200,height=100')
          See this page for more info.

          Comment

          • akg
            New Member
            • Jan 2007
            • 19

            #6
            problem is my asp.net page will be of varying width and height and before calling in window.open method I can't get its full height and width.

            Amit

            Comment

            • acoder
              Recognized Expert MVP
              • Nov 2006
              • 16032

              #7
              Then how will you get the height and width after calling the page?

              Comment

              • abctech
                New Member
                • Dec 2006
                • 157

                #8
                Originally posted by akg
                problem is my asp.net page will be of varying width and height and before calling in window.open method I can't get its full height and width.

                Amit
                Well even if you donot know the height and width in advance still you can specify a certain height and width and keep scrollbars, will that help?
                [HTML]window.open(url ,"mywindow","lo cation=1,status =1,scrollbars=1 ,width=500,heig ht=300");[/HTML]

                Comment

                • akg
                  New Member
                  • Jan 2007
                  • 19

                  #9
                  Originally posted by acoder
                  Then how will you get the height and width after calling the page?
                  document.getEle mentById(id).of fsetWidth

                  Comment

                  • akg
                    New Member
                    • Jan 2007
                    • 19

                    #10
                    Originally posted by abctech
                    Well even if you donot know the height and width in advance still you can specify a certain height and width and keep scrollbars, will that help?
                    [HTML]window.open(url ,"mywindow","lo cation=1,status =1,scrollbars=1 ,width=500,heig ht=300");[/HTML]

                    no abctech, I don't have to show scrollbar to the users.

                    Comment

                    Working...