| | |
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 ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate automatically beta box browser bug calendar captchaformproblem checkbox child class close column createrange() css cursor decimal dependent design disablefirebug dom download dropdown editor element engine error events explorer ext file form forms google gwt gxt hiddenvalue highlightedword html htmlform ie8 iframe images index internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jump libcurl listbox math media microsoft mimic mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php player post problem progressbar regex runtime scroll search security select session shopping size software sql text textarea unicode w3c web website window windowofwords windowsxp wysiwyg \n






