﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebDesktop - Detect unsaved changes before window closes</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/Detect-unsaved-changes-before-window-closes/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Detect unsaved changes before window closes</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/Detect-unsaved-changes-before-window-closes/</link><pubDate>Mon, 15 Feb 2010 23:46:10 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p /&gt;&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;&lt;span style="font-size: 9pt; "&gt;Hi Sukhdepp Kaur,&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Okay, now I understand the situation. Yes, it would be a really big help and appreciation if you would kindly to send the running sample into my email. You can send them to my email at andi@intersoftpt.com. Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>Detect unsaved changes before window closes</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/Detect-unsaved-changes-before-window-closes/</link><pubDate>Mon, 15 Feb 2010 02:38:34 GMT</pubDate><dc:creator>Skaur</dc:creator><description>&lt;p&gt;Hi Andy,&lt;/p&gt;
&lt;p&gt;Thanks for your reply. I tried the code you have provided. My issue is slightly different. OnBeforeClosed event i want to check if there are any unsaved changes on page, then show the prompt to ask user "if they want to save changes". If there are no unsaved changes then i dont need any prompt before close. But if i use webdialogbox like you have suggested, it will appear everytime user clicks 'X' on window. I am already checking for unsaved changes on the onbeforeunload event of page which is ContentURL of window. It works fine just shows the prompt after closing the window. I would like to send you code sample of what i am trying to achieve if you can kindly provide me with your email address.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Sukhdeep&lt;/p&gt;</description></item><item><title>Detect unsaved changes before window closes</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/Detect-unsaved-changes-before-window-closes/</link><pubDate>Sun, 14 Feb 2010 23:48:16 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi Sukhdepp Kaur,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Yes, the best way to do so is by using a client side event OnBeforeWindowClosed and make the return value into false. The object expected error is occured, perhaps, you did not specify the specific object. Attached is a sample code to show a WebDialogBox after we click on "X" button and asking for confirmation of closing the window.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; I hope it helps and please do not hesitate to ask if you have any other questions. Thank you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Detect unsaved changes before window closes</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/Detect-unsaved-changes-before-window-closes/</link><pubDate>Fri, 12 Feb 2010 00:27:20 GMT</pubDate><dc:creator>Skaur</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am using WebDeskTopManager with couple of shortcuts. On click of each shortcut, window opens up with required URL. I am using onbeforeunload event to check unsaved changes on page. It works for just about everything but if i make some change on page and click 'X' button of window to close it, window closes first and then prompt comes up asking for "do you want to save?" but by that time window is already closed so its too late. Is there a way to stop window from closing and ask for save? I tried using OnBeforeWindowClosed event but i get object expected error. In documentation, its being called on pageloaded event. But when i do that, nothing happens and on pageLoad event it gets error.&lt;/p&gt;
&lt;p&gt;Any suggestion will be welcome.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;</description></item></channel></rss>