Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

javascript popup window with no X (close button)

Posted on 2004-10-26
12
Medium Priority
?
628 Views
Last Modified: 2008-03-03
hello,
i'm developing an intranet system for users here where i work, i'm trying to create an asp driven order entry system. I would like to remote the x (close window) button from the browser, is there a way to do this? I want to do this to force the user to logout instead of x'ing out the window. if it has to be created through a popup window that is fine, any method should work.. thanks!

0
Comment
Question by:LTY83
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +2
12 Comments
 
LVL 4

Expert Comment

by:sgalzin
ID: 12410655
hi,

i know how to do that for internet explorer only : would that interest you ? something like this ?

http://www.doublespiral.net/andalousie/vpa.html

(click on the picture to see an example of such a window)

stephane.
0
 
LVL 4

Author Comment

by:LTY83
ID: 12410668
ie should work, however all browers would be better in teh case ie is corrupt and we need to use mozilla or netscape,, but this should be ok
0
 
LVL 4

Author Comment

by:LTY83
ID: 12410678
hmm it appears that window still has an x, however maybe its because i have newest IE browser?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 4

Author Comment

by:LTY83
ID: 12410705
btw if that is you you are stunning.. :)
0
 
LVL 4

Expert Comment

by:sgalzin
ID: 12410851
thanks ;-)
my girlfriend & myself in spain !

i actually put the cross there, you can choose not to have it or put the logout code behind the action, as you wish : it's an image.

to do that, here's the trick : open a window as fullscreen then resize it :
 var w = window.open ( '', '', 'fullscreen=yes,resizable=yes' );
 w.resizeTo ( 300, 200 );

hope that helps,

stephane.
0
 
LVL 4

Expert Comment

by:sgalzin
ID: 12410862
ps : i am sure that won't work in netscape or mozilla as this is (kind of) a security hack...
0
 
LVL 4

Author Comment

by:LTY83
ID: 12411020
heh sorry buddy was talkin about yer gf, i'm not sure if this works tho, in my browser it still shows the x, i have the newest version of ie as well
0
 
LVL 15

Expert Comment

by:justinbillig
ID: 12411253
There is no way to accomplish what your asking, the closest thing you'll get is what sgalzin has already suggested
0
 
LVL 18

Expert Comment

by:arantius
ID: 12411271
No you cannot do this.

How would you like it for nefarious sites around the world to open windows you cannot close?  Plain and simple, especially with better browsers like Mozilla, the web page does not have this kind of control on the browser.

If you want to control things like this, you need to write a native windows application, not a web page.  In the example posted, true, the window takes up the whole screen and moves the title bar (and thus the x button) off the screen, but you can still hit Alt-F4 to close it.
0
 
LVL 12

Accepted Solution

by:
minichicken earned 2000 total points
ID: 12412079
<script language="javascript">
window.open('http://www.mydomain.com','popup', 'fullscreen= yes, left = 0, top =0, toolbar=no, location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes, resizable=no');
</script>
0
 
LVL 4

Author Comment

by:LTY83
ID: 12412109
beautiful minichicken, u rock,
0
 
LVL 12

Expert Comment

by:minichicken
ID: 12412258
cool :)
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question