| | |
Problem with IE7
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2007
Posts: 19
Reputation:
Solved Threads: 0
Hi,
I am working on the IE7 bowser. when i close(exit) the browser. i want to need a conformation.
I have written the below code but its working in IE6 only.
code :
<html>
<head>
<script type="text/javascript">
window.onbeforeunload=function(){
if (window.event.clientY < 0 && (window.event.clientX > (document.documentElement.clientWidth - 5) || window.event.clientX < 15) ) {
alert("closing window");
}
}
</script>
</head>
<body>
test
</body>
</html>
pls help me out
I am working on the IE7 bowser. when i close(exit) the browser. i want to need a conformation.
I have written the below code but its working in IE6 only.
code :
<html>
<head>
<script type="text/javascript">
window.onbeforeunload=function(){
if (window.event.clientY < 0 && (window.event.clientX > (document.documentElement.clientWidth - 5) || window.event.clientX < 15) ) {
alert("closing window");
}
}
</script>
</head>
<body>
test
</body>
</html>
pls help me out
•
•
Join Date: May 2005
Posts: 514
Reputation:
Solved Threads: 19
Give tis a shot:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
//Response.Write("<script>javascript:var w = window.open('clickonce.application','_blank'); w.opener=null; w.open('','_self'); w.close(); window.open('','_self'); window.opener=null; window.close();</script>");
This Code may help you
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<script type="text/javascript"> window.onbeforeunload = function (evt) { var message = 'Are you sure you want to leave?'; if (typeof evt == 'undefined') { evt = window.event; } if (evt) { evt.returnValue = message; } return message; } </script>
•
•
Join Date: Nov 2007
Posts: 19
Reputation:
Solved Threads: 0
hi,
sorry urs code is not working.
I am using IE7 browser. Actually my requirement is if i close(X) the browser then i want to get the conformation same as when i closing the tabs also i want to get the conformation and same as when i close the tabs from the task bar also i need a conformation.
I have written the code but its working only when i close(x) button. i need that two aslo
code :
<html>
<script language="javascript">
window.onbeforeunload = function() //author: meizz
{
var n = window.event.screenX - window.screenLeft;
var b = n > document.documentElement.scrollWidth-20;
if(b && window.event.clientY < 0 || window.event.altKey)
{
window.event.returnValue = "";
alert('close');
}
}
</script>
please help me out.
Thanks in advance.
sorry urs code is not working.
I am using IE7 browser. Actually my requirement is if i close(X) the browser then i want to get the conformation same as when i closing the tabs also i want to get the conformation and same as when i close the tabs from the task bar also i need a conformation.
I have written the code but its working only when i close(x) button. i need that two aslo
code :
<html>
<script language="javascript">
window.onbeforeunload = function() //author: meizz
{
var n = window.event.screenX - window.screenLeft;
var b = n > document.documentElement.scrollWidth-20;
if(b && window.event.clientY < 0 || window.event.altKey)
{
window.event.returnValue = "";
alert('close');
}
}
</script>
please help me out.
Thanks in advance.
![]() |
Similar Threads
- IE6/IE7 unexpectedly drops the PHP Session ID cookie (PHPSESSID) (PHP)
- Taskbar / Sound Problem (Viruses, Spyware and other Nasties)
- MORE ie7 hanging/sometimes Firefox too! (Web Browsers)
- I don't like IE7 (Web Browsers)
- Bugs since IE7 - Help! (Windows NT / 2000 / XP)
- Problem with lists in advanced reply (DaniWeb Community Feedback)
- Problem accessing secure sites (Viruses, Spyware and other Nasties)
- Minor bug with daniweb and IE7 (DaniWeb Community Feedback)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: adding scrollbars to window
- Next Thread: window.close() problems
| 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





