Javascript pop up window

I am trying to open a Javascript pop up window without the minimize, maximize or close buttons.
Please advise how can this be achieved.
Thanks in advance.
vdesai_8Asked:
Who is Participating?
 
Steve BinkCommented:
You can use the javascript confirm() dialog box.  After a delay of 5 minutes, pop up a confirmation.  If they hit 'OK', take them to the login/authentication page.  If they hit 'Cancel', finish logging them out and redirect them to an index.

IMHO, you should just automatically log them out after 5 minutes and have them log back in.  You would essentially be doing the same thing by just asking for their password.
0
 
Steve BinkCommented:
I do not believe this is possible with javascript.  The control box (min,max,close buttons) are a function of the windows environment, not the browser.  Since you have no control of the remote system through javascript, you probably cannot affect their presence or appearance.

If you code the script into a java applet with permissions to run remotely, you might be able to.  Not being familiar with java, I can't lend any assistance along that line.
0
 
Michel PlungjanIT ExpertCommented:
you are correct.
Using window.open it is not possible.
If you can load the page from harddisc, you can use HTA (html applications)

However using something like submodal, you can fake the window with a layer:

http://www.subimage.com/dhtml/subModal/
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
GawaiCommented:
if you are talkig abot popup window you cant do that.
but there is a trick to display a window without buttons. it will be a layer.

http://developer.apple.com/internet/webcontent/hideshow_layer.html

http://developer.apple.com/internet/webcontent/examples/popup.html
0
 
GawaiCommented:
<script>
function ShowDiv(DivName)
      {
            if      (document.layers) {
                  document.layers[DivName].visibility="visible";
            } else if (document.getElementById) {
                  document.getElementById(DivName).style.display="";
                  document.getElementById(DivName).style.visibility="visible";
            } else if (document.all) {
                  document.all(DivName).style.display="";
                  document.all(DivName).style.visibility="visible";
            }
      }

      function HideDiv(DivName)
      {
            if      (document.layers) {
                  document.layers[DivName].visibility="hidden";
            } else if (document.getElementById) {
                  document.getElementById(DivName).style.display="none";
                  document.getElementById(DivName).style.visibility="hidden";
            } else if (document.all) {
                  document.all(DivName).style.display="none";
                  document.all(DivName).style.visibility="hidden";
            }
      }
</script>

      <DIV id="popup" style="Z-INDEX: 999; LEFT: 40%; VISIBILITY: hidden; WIDTH: 239px; POSITION: absolute; TOP: 300px; BACKGROUND-COLOR: #3f3f3f">

        <div id="CloseWindow" align="right" style="height:77px; font-size:10px;">
          <div style="padding-top:5px; padding-right:8px;"><a href="javascript:HideDiv('popup');" style="color:#ffffff;">X Close</a></div>
        </div>

      </DIV>

<a href="javascript:ShowDiv('popup');" class="White" title="popup">Show Popup</a>
0
 
Michel PlungjanIT ExpertCommented:
a better way is
<a href="#" onClick="ShowDiv('popup'); return false"
0
 
Pravin AsarPrincipal Systems EngineerCommented:
You can not disable minimize , but you can disable maximize, addressbar  option with IE 7


function OpenCenWindow (imgURL, winname, width, height) {
  var x = 0.5 *(window.screen.width - width);
  var y = 0.5 *(window.screen.height - height);
  var posStr = ", screenX=" + x + ", screenY=" + y;
  if (popWin!= null)  {
                  popWin.close();
  }
  if (document.all) {
             posStr = ", left=" + x + ", top=" + y;
  }
  var pStr = 'resizable=no, status=no,width=' + width + ', height=' + height +
             ', alwaysRaised=1, addressbar=no, titlebar=no, toolbar=no, menubar=no' +
             ', minimize=no,maximize=no, status=no';
  popWin = window.open ("", winname,pStr +posStr );
  var imgStr = "<img src=\"" + imgURL.src + "\"  width=\"" + width + "\""
                                          + " height=\"" + height + "\">";
  popWin.document.write (imgStr);
  popWin.onblur = function () { self.window.close(); }
  popWin.onmouseout = function () { self.window.close(); }
  popWin.focus();
}

0
 
Michel PlungjanIT ExpertCommented:
this is not correct syntax, spaces are not allowed
 var pStr = 'resizable=no, status=no,width=' + width + ', height=' + height +
             ', alwaysRaised=1, addressbar=no, titlebar=no, toolbar=no, menubar=no' +
             ', minimize=no,maximize=no, status=no';

 var pStr = 'width=' + width + ',height=' + height +
             ',alwaysRaised' +
             ',minimize=no,maximize=no';

should be enough if that is possible (which I doubt)
0
 
vdesai_8Author Commented:
Thanks Gurus for your replies. I get your point but what I am trying to do is pop up a modal dialog box. If the user is inactive(no mouse or keyboard movement) for 5 minutes, I want to ask the user for password again. If the user enters it he should be able to continue the session otherwise he should be logged out. Seems from your replies that its not possible with Javascript. Could you please advise some other way around to accomplish this?

Thanks!
0
 
Michel PlungjanIT ExpertCommented:
Using the submodal and ajax, it is possible to pop the login box from the same server...
0
 
LeeKowalkowskiCommented:
I'd recommend you stick to the standard client/server model, which is if the browser has not interacted with the server for 5 minutes (quite short that), not if the user has not interacted with the keyboard or mouse.

--
Lee

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.