disable minimize

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fluff
    New Member
    • Aug 2007
    • 20

    #1

    disable minimize

    Hello,

    I have a html page with javascript in it.
    How do I disable the minimize (the box with the underscore in it in the corner)?
    I know there are already several people who asked the same question and the answers are useful like from this:


    but the solutions don't work exactly the way I want.

    putting onblur="this.fo cus()" in the body does keep the page from being minimized, but then I can't type anything in my textboxes.

    When I use the showModalDialog Method, the javascript timer that refeshed my page every five minutes doesn't work anymore.

    When I use this: window.open("pa ge.html"...resi zable=0);
    only the Maximize/restore down button on the top middle is disabled. The minimized wasn't disabled.

    Is there another way? Or should one of these work if used correctly?

    Thank you for your time.
    Last edited by fluff; Mar 10 '08, 07:21 AM. Reason: missing info
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    First of all, ask yourself if you really need this. Assuming that this is needed and there is no alternative, show your child and parent window code or a link.

    Comment

    • fluff
      New Member
      • Aug 2007
      • 20

      #3
      I made this program for a kiosk where people pretty much come in, type in their info, click submit and wait for their number to be called.

      I have this javascript in the head part of my html.
      The page will refresh every five minutes and the page will go back to full page if the size was changed.
      I also have it so if the user starts inputting into the textbox, a two minute timer starts and will submit itself if the user forgets to submit so their info isn't just sitting there on the screen.

      So what I want really is if the minimize was clicked, the page will pop back up at full size, or make it so that they cannot minimize at all.

      Code:
      <script Language="JavaScript">
      self.moveTo(0,0);self.resizeTo(screen.availWidth,screen.availHeight); 
      
      var timerID ="";
      
      timerID = setTimeout("window.location.reload(true);",300000);
      
      function restartTimer()
      {
      if (timerID != ""){
      clearTimer();}
      
      startTimer();
      }
      
      function startTimer()
      {
      timerID = setTimeout("document.myform.submit();",120000);
      }
      
      function clearTimer()
      {
      clearTimeout(timerID);
      }
      </script>

      Comment

      • rnd me
        Recognized Expert Contributor
        • Jun 2007
        • 427

        #4
        if the refresh code is broken by an otherwise usable solution, fix the refresh code.

        you can do it without js
        Code:
        <meta http-equiv="refresh" content="300"/>
        will refresh every 5 mins, put it in your head.

        Comment

        • fluff
          New Member
          • Aug 2007
          • 20

          #5
          Originally posted by rnd me
          if the refresh code is broken by an otherwise usable solution, fix the refresh code.

          you can do it without js
          Code:
          <meta http-equiv="refresh" content="300"/>
          will refresh every 5 mins, put it in your head.

          rnd me,

          Thank you. You're timer code works fine, but is the minimized page suppose to become active again when the timer is up?
          The minimized page just stays minimized.

          Comment

          • rnd me
            Recognized Expert Contributor
            • Jun 2007
            • 427

            #6
            you can use line number 2 of code from post number 3 in your body tag to perform likewise resizing.

            <body onload="self.mo ...">

            Comment

            Working...