Web Analytics Made Easy -
StatCounter Minimize custom window - CodingForum

Announcement

Collapse
No announcement yet.

Minimize custom window

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Minimize custom window

    Hi, i have a pop-up window that doesnt have any of the browser borders or anything. I was wondering if there was a simple code to have a link make the window minimize, such as:

    <a href="javascript:top.window.minimize()">minimize window</a>

    the above code does not work, and i was wondering if i was wrong....thanks for all of your help!
    -Sk8er9547

  • #2
    With JavaScript you can't minimize a window. All you can do is remove focus from it which would place it behind the main window. Trh this:
    <A HREF="javascript:window.blur()">Minimize Window</A>

    The blur() method removes focus.

    Comment


    • #3
      you can do this.....

      window.resizeTo(100,100);
      window.moveTo(3000,3000);
      self.blur();
      Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

      Comment


      • #4
        cool! but in Netscape, it doesn't allow window to be positioned out of the desktop area, maybe it's a security issue.

        Originally posted by A1ien51
        you can do this.....

        window.resizeTo(100,100);
        window.moveTo(3000,3000);
        self.blur();
        Glenn
        vBulletin Mods That Rock!

        Comment


        • #5
          I personally would do this:



          window.resizeTo(100,100);
          if(document.all){window.moveTo(3000,3000);}
          else{window.moveTo(0,0);}
          self.blur();


          A1ien51
          Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

          Comment


          • #6
            so it's not "minimize" anymore for NS?

            Originally posted by A1ien51
            I personally would do this:



            window.resizeTo(100,100);
            if(document.all){window.moveTo(3000,3000);}
            else{window.moveTo(0,0);}
            self.blur();


            A1ien51
            Glenn
            vBulletin Mods That Rock!

            Comment


            • #7
              It will not hide it, but will just move it off to the side to keep the error from happening
              Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

              Comment


              • #8
                so it's better if the code is this:

                if(document.all){
                window.resizeTo(100,100);
                window.moveTo(3000,3000);
                self.blur();
                }
                else{
                alert("Sorry, IE feature only.");
                }
                Glenn
                vBulletin Mods That Rock!

                Comment


                • #9
                  I wouldn't want to see an alert, I would do it the way I did it.
                  You could also get a signed script for netscape to move it off of the screen or make it smaller. Look at netscapes website on programming for that
                  Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

                  Comment


                  • #10
                    Thanks for everything guys! Now i have a problem with moving the window. I want to be able to move the custom window around to any position using click and drag, just like you could in a normal web browser. Any ideas?
                    -Sk8er9547

                    Comment


                    • #11
                      LOL....expecting me to give all of my secrets away......??

                      Right now I have developed a fully functional window which you are trying to do.......but the code is 2hrs away, so I can not finish it...ugh......Oh welll.....

                      look on Dynamic Drive, they have a window like you want.....

                      Mine will be posted on my site sometime this weekend I hope....

                      Send me an email at [email protected] and I will send you an email telling you when I put it online.

                      A1ien51
                      Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

                      Comment

                      Working...
                      X