<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Preventing Users from Accidently Navigating Away From Your Flex App</title>
	<atom:link href="http://seanmonahan.org/2009/03/19/preventing-users-from-accidently-navigating-away-from-your-flex-app/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanmonahan.org/2009/03/19/preventing-users-from-accidently-navigating-away-from-your-flex-app/</link>
	<description></description>
	<lastBuildDate>Wed, 22 Jun 2011 21:47:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Sean</title>
		<link>http://seanmonahan.org/2009/03/19/preventing-users-from-accidently-navigating-away-from-your-flex-app/comment-page-1/#comment-1759</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Wed, 22 Jun 2011 21:47:09 +0000</pubDate>
		<guid isPermaLink="false">http://seanmonahan.org/?p=368#comment-1759</guid>
		<description>Hi Bonnie,

It&#039;s been awhile so I&#039;ll do my best to make sure I get all of this straight.  You must manually manually make your ExternalInterface call.  There are two calls you can make:

1) To set the prompt text (the message the user sees).
2) To toggle the prompt value (whether or not the user should be prompted).

Anytime you want to change one of these values you need to make the ExternalInterface call.  For example, if you want to prompt a user if he navigates away from the app with some unsaved document you would make a call to set prompt to &lt;code&gt;true&lt;/code&gt; when the document was unsaved and make another call to set prompt to &lt;code&gt;false&lt;/code&gt; when the was saved.</description>
		<content:encoded><![CDATA[<p>Hi Bonnie,</p>
<p>It&#8217;s been awhile so I&#8217;ll do my best to make sure I get all of this straight.  You must manually manually make your ExternalInterface call.  There are two calls you can make:</p>
<p>1) To set the prompt text (the message the user sees).<br />
2) To toggle the prompt value (whether or not the user should be prompted).</p>
<p>Anytime you want to change one of these values you need to make the ExternalInterface call.  For example, if you want to prompt a user if he navigates away from the app with some unsaved document you would make a call to set prompt to <code>true</code> when the document was unsaved and make another call to set prompt to <code>false</code> when the was saved.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bonnie</title>
		<link>http://seanmonahan.org/2009/03/19/preventing-users-from-accidently-navigating-away-from-your-flex-app/comment-page-1/#comment-1758</link>
		<dc:creator>Bonnie</dc:creator>
		<pubDate>Wed, 22 Jun 2011 16:31:29 +0000</pubDate>
		<guid isPermaLink="false">http://seanmonahan.org/?p=368#comment-1758</guid>
		<description>Hi Sean,

I&#039;m confused as to where/when in my ActionScript code I should be making the ExternalInterface call.  Meaning under what conditions?

Or are you saying that it doesn&#039;t matter where I place this call, it&#039;s going to get called automatically when the browser dispatches the onbeforeunload event?

Thanks,
Bonnie</description>
		<content:encoded><![CDATA[<p>Hi Sean,</p>
<p>I&#8217;m confused as to where/when in my ActionScript code I should be making the ExternalInterface call.  Meaning under what conditions?</p>
<p>Or are you saying that it doesn&#8217;t matter where I place this call, it&#8217;s going to get called automatically when the browser dispatches the onbeforeunload event?</p>
<p>Thanks,<br />
Bonnie</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://seanmonahan.org/2009/03/19/preventing-users-from-accidently-navigating-away-from-your-flex-app/comment-page-1/#comment-286</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Wed, 02 Dec 2009 23:01:07 +0000</pubDate>
		<guid isPermaLink="false">http://seanmonahan.org/?p=368#comment-286</guid>
		<description>@Vaibhav: I don&#039;t think there is a way to detect whether OK or Cancel was clicked save that a user who clicks cancel will still be on the page.  And that doesn&#039;t really help your situation.  Have you tried listening for the onunload event?  I believe this is fired after onbeforeunload.</description>
		<content:encoded><![CDATA[<p>@Vaibhav: I don&#8217;t think there is a way to detect whether OK or Cancel was clicked save that a user who clicks cancel will still be on the page.  And that doesn&#8217;t really help your situation.  Have you tried listening for the onunload event?  I believe this is fired after onbeforeunload.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vaibhav</title>
		<link>http://seanmonahan.org/2009/03/19/preventing-users-from-accidently-navigating-away-from-your-flex-app/comment-page-1/#comment-285</link>
		<dc:creator>Vaibhav</dc:creator>
		<pubDate>Wed, 02 Dec 2009 19:21:08 +0000</pubDate>
		<guid isPermaLink="false">http://seanmonahan.org/?p=368#comment-285</guid>
		<description>Hi.. very good post. I have also implemented the same way in my application. But problem is, I want to logout the current user if the user selects OK in the dialogue.
Can we trap the OK and do some required functionality in application and then return back the control to JS for reloading the page. ?</description>
		<content:encoded><![CDATA[<p>Hi.. very good post. I have also implemented the same way in my application. But problem is, I want to logout the current user if the user selects OK in the dialogue.<br />
Can we trap the OK and do some required functionality in application and then return back the control to JS for reloading the page. ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://seanmonahan.org/2009/03/19/preventing-users-from-accidently-navigating-away-from-your-flex-app/comment-page-1/#comment-225</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Fri, 29 May 2009 02:50:14 +0000</pubDate>
		<guid isPermaLink="false">http://seanmonahan.org/?p=368#comment-225</guid>
		<description>What did you do Vanessa? Please tell us, this popup window is driving me crazy!!!</description>
		<content:encoded><![CDATA[<p>What did you do Vanessa? Please tell us, this popup window is driving me crazy!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vanessa</title>
		<link>http://seanmonahan.org/2009/03/19/preventing-users-from-accidently-navigating-away-from-your-flex-app/comment-page-1/#comment-23</link>
		<dc:creator>Vanessa</dc:creator>
		<pubDate>Sat, 04 Apr 2009 15:54:42 +0000</pubDate>
		<guid isPermaLink="false">http://seanmonahan.org/?p=368#comment-23</guid>
		<description>well i dont knw how but it went away! i made some changes on my laptop and then restarted it. it worked! the message is now gone. 

anyway, thanks for the reply. i really appreciate it.</description>
		<content:encoded><![CDATA[<p>well i dont knw how but it went away! i made some changes on my laptop and then restarted it. it worked! the message is now gone. </p>
<p>anyway, thanks for the reply. i really appreciate it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://seanmonahan.org/2009/03/19/preventing-users-from-accidently-navigating-away-from-your-flex-app/comment-page-1/#comment-22</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Fri, 03 Apr 2009 22:11:21 +0000</pubDate>
		<guid isPermaLink="false">http://seanmonahan.org/?p=368#comment-22</guid>
		<description>Vanessa,

Sadly there is nothing you can do abou the &quot;Are you sure you want to navigate away from this page?&quot; and &quot;Press OK to continue, or cancel to stay on the current page.&quot; lines.  All you can do is stuff your own message in between the two lines.

In all my Googling I couldn&#039;t find an explanation as to why onbeforeunload works this way, only that is does and there is no getting around it.</description>
		<content:encoded><![CDATA[<p>Vanessa,</p>
<p>Sadly there is nothing you can do abou the &#8220;Are you sure you want to navigate away from this page?&#8221; and &#8220;Press OK to continue, or cancel to stay on the current page.&#8221; lines.  All you can do is stuff your own message in between the two lines.</p>
<p>In all my Googling I couldn&#8217;t find an explanation as to why onbeforeunload works this way, only that is does and there is no getting around it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vanessa</title>
		<link>http://seanmonahan.org/2009/03/19/preventing-users-from-accidently-navigating-away-from-your-flex-app/comment-page-1/#comment-21</link>
		<dc:creator>vanessa</dc:creator>
		<pubDate>Fri, 03 Apr 2009 22:05:10 +0000</pubDate>
		<guid isPermaLink="false">http://seanmonahan.org/?p=368#comment-21</guid>
		<description>i keep getting this error that says:

Are you sure you want to navigate away from this page?

Wait! Here&#039;s where I write my message. 

Press OK to continue, or cancel to stay on the current page. 

what should i do to avoid it?</description>
		<content:encoded><![CDATA[<p>i keep getting this error that says:</p>
<p>Are you sure you want to navigate away from this page?</p>
<p>Wait! Here&#8217;s where I write my message. </p>
<p>Press OK to continue, or cancel to stay on the current page. </p>
<p>what should i do to avoid it?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

