Click here to Skip to main content
15,903,201 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHow to display a message when user is closing the Browser Pin
mangrovecm3-Jul-07 15:34
mangrovecm3-Jul-07 15:34 
AnswerRe: How to display a message when user is closing the Browser Pin
Michael Sync3-Jul-07 17:00
Michael Sync3-Jul-07 17:00 
QuestionRe: How to display a message when user is closing the Browser Pin
mangrovecm3-Jul-07 17:23
mangrovecm3-Jul-07 17:23 
AnswerRe: How to display a message when user is closing the Browser Pin
Michael Sync3-Jul-07 17:37
Michael Sync3-Jul-07 17:37 
GeneralRe: How to display a message when user is closing the Browser Pin
mangrovecm3-Jul-07 18:06
mangrovecm3-Jul-07 18:06 
GeneralRe: How to display a message when user is closing the Browser Pin
N a v a n e e t h3-Jul-07 18:09
N a v a n e e t h3-Jul-07 18:09 
GeneralRe: How to display a message when user is closing the Browser Pin
mangrovecm3-Jul-07 18:24
mangrovecm3-Jul-07 18:24 
GeneralRe: How to display a message when user is closing the Browser Pin
Michael Sync3-Jul-07 20:15
Michael Sync3-Jul-07 20:15 
>>Thank for your reply, Could you test the case which you link to other page?
>>I think that the message will displays. I don't want to display a message >>this case. I would like to display a message if user clicked Close Button (X >>button on the right top)
>>Thank all your helps


chk it out. hope it would help..

<code>
<!-- Warning if user is exitting Browser -->
<script type="text/javascript">
var UNLOAD_MSG = "You will lose any unsaved changes!";

var IGNORE_UNLOAD = true;

function doBeforeUnload()
{
if(IGNORE_UNLOAD) return; // Let the page unload

if(window.event)
window.event.returnValue = UNLOAD_MSG; // IE
else
return UNLOAD_MSG; // FX
}

if(window.body)
window.body.onbeforeunload = doBeforeUnload; // IE
else
window.onbeforeunload = doBeforeUnload; // FX
</script>

<!-- Check if user has shopped product -->
<script type="text/javascript">
function CheckOrder(isChanges)
{
IGNORE_UNLOAD = isChanges;
}
</script>

<body onload="CheckOrder(false);">
<form>
<!-- .....-->
<a href="http://michaelsync.net" onclick="CheckOrder(true);">mike</a>
</form>
</body>
</code>



Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)

If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. Smile | :)




Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)

If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. Smile | :)
GeneralRe: How to display a message when user is closing the Browser Pin
mangrovecm4-Jul-07 17:54
mangrovecm4-Jul-07 17:54 
Questionwhere do I find DefaultClientScript property Pin
GuildfordG3-Jul-07 14:31
GuildfordG3-Jul-07 14:31 
AnswerRe: where do I find DefaultClientScript property Pin
Michael Sync3-Jul-07 17:06
Michael Sync3-Jul-07 17:06 
GeneralRe: where do I find DefaultClientScript property Pin
GuildfordG3-Jul-07 22:32
GuildfordG3-Jul-07 22:32 
GeneralRe: where do I find DefaultClientScript property Pin
Michael Sync3-Jul-07 23:03
Michael Sync3-Jul-07 23:03 
GeneralRe: where do I find DefaultClientScript property Pin
GuildfordG4-Jul-07 15:06
GuildfordG4-Jul-07 15:06 
QuestionSetting Button and Textbox focus Pin
devil853-Jul-07 10:53
devil853-Jul-07 10:53 
AnswerRe: Setting Button and Textbox focus Pin
RepliCrux3-Jul-07 13:32
RepliCrux3-Jul-07 13:32 
AnswerRe: Setting Button and Textbox focus Pin
sidbaruah3-Jul-07 18:56
sidbaruah3-Jul-07 18:56 
AnswerRe: Setting Button and Textbox focus Pin
Fred_Smith4-Jul-07 10:50
Fred_Smith4-Jul-07 10:50 
GeneralRe: Setting Button and Textbox focus Pin
devil855-Jul-07 4:39
devil855-Jul-07 4:39 
QuestionWhich button was clicked within a form. Pin
Martin_3-Jul-07 10:48
Martin_3-Jul-07 10:48 
AnswerRe: Which button was clicked within a form. Pin
Christian Graus3-Jul-07 10:56
protectorChristian Graus3-Jul-07 10:56 
GeneralRe: Which button was clicked within a form. Pin
Martin_5-Jul-07 3:46
Martin_5-Jul-07 3:46 
QuestionReportViewer vertical Scrollbar crash Pin
BGadhia3-Jul-07 10:15
BGadhia3-Jul-07 10:15 
AnswerRe: ReportViewer vertical Scrollbar crash Pin
BGadhia3-Jul-07 12:51
BGadhia3-Jul-07 12:51 
QuestionASP YouTube Clone Script Pin
septemberq3-Jul-07 9:23
septemberq3-Jul-07 9:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.