| | |
How to disbale Close(X) button in title bar
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Immediate thought
Malware
Imagine if you could not close a web browser when you went to some site on the internet that was loading your computer full of viruses!
lookup
onclose
onunload
something like
code is untested, just thought process
Malware
you cant close this page unless you buy somethingYou are not supposed to take control of the browser
your pc is infected send us money
Imagine if you could not close a web browser when you went to some site on the internet that was loading your computer full of viruses!
lookup
onclose
onunload
something like
javascript Syntax (Toggle Plain Text)
<script language="JavaScript"> <!-- var legalExit=0; var lpx=10; function leave() { if(legalExit==0) { var dl=confirm('WARNING: Closing this window means bla bla bla.\n\nClick OK to remain.'); if(dl) { if(window.screen){ lpx=screen.width;lpx=lpx-225; } var op=window.open('filename','','width=170,height=185,location=no,status=no,directories=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,top=10,left=' + lpx); } } } function openWin(u,t,x,y,s) { var op=window.open(u,t,'width='+x+',height='+y+',location=no,status=yes,toolbar=no,directories=no,menubar=no,scrollbars='+s+',resizable=no'); op.focus(); } // --> </script>
Last edited by almostbob; Apr 23rd, 2009 at 10:51 am.
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
•
•
Join Date: Nov 2008
Posts: 8
Reputation:
Solved Threads: 0
Thanks almostbob...
But this does not help me much. My browser window will contain all features as menubar, addressbar, standard button all... but this browser should not allow the user to close on clicking close (X) button. at time time a pop up massage appears with 'User cannot click on this Close Button'. the user must select the logOut menu to sign out.
Please send the code if you have.
Thanks -- ukbasak
But this does not help me much. My browser window will contain all features as menubar, addressbar, standard button all... but this browser should not allow the user to close on clicking close (X) button. at time time a pop up massage appears with 'User cannot click on this Close Button'. the user must select the logOut menu to sign out.
Please send the code if you have.
Thanks -- ukbasak
YOU CAN TRY WITH BELOW SCRIPT.
JUST PASTE THE BELOW SNIPPET WITHIN HEAD TAG:
JUST PASTE THE BELOW SNIPPET WITHIN HEAD TAG:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
window.onbeforeunload = confirmExit; function confirmExit() { if (window.event.clientY < 0 && window.event.clientY < -80) { return 'You will be logged out.'; // You can set return false here. } }
MARK AS SOLVED if its help you.
REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
Perhaps look into sessions, no experience to offer but.,,
it
logs them out of the server after time of no activity
whether they click the bye-bye button or no
it
logs them out of the server after time of no activity
whether they click the bye-bye button or no
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: javascript openWindow() problem
- Next Thread: Simple Javascript Graphics
| Thread Tools | Search this Thread |
acid2 ajax ajaxexample ajaxjspservlets array beta box browser captchaformproblem cart child class close codes column css date debugger decimal dependent design disablefirebug dom download editor element embed engine enter error events explorer ext file firefox focus form forms frameworks getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe index java javascript javascripthelp2020 jquery jsf jsp jump libcurl listbox maps masterpage math media menu microsoft mimic mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php player position post problem programming prototype redirect safari scale scriptlets scroll search security select software toggle unicode variables w3c web window windowofwords \n






