| | |
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, you don't have to do anything to get it
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, you don't have to do anything to get it
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
Views: 1421 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
acid2 ajax ajaxcode ajaxhelp animate array automatically autoplay beta boarder box bug button calendar captcha card cart codes column cookies createrange() css cursor date debugger decimal design developer dom download dropdown element enter error events firefox firehose flash focus form frameworks getselection google gwt html htmlform iframe image() index java javascript javascripts jawascriptruntimeerror jquery jsp listbox maps marquee masterpage menu microsoft mimic mp3 mp4 offline onmouseover parameters php player post problem programming progressbar prototype rating redirect regex safari scale scriptlets search select size sources sql starrating text textarea toggle twitter validation variables w3c web website window windowofwords windowsxp xml xspf






