<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Client Side Web Development</title><link>http://forums.asp.net/130.aspx</link><description>Client-side programming discussions, including CSS, DHTML, JScript/Javascript, etc. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=18&amp;c=16" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: onbeforeunload and eval Problems in IE</title><link>http://forums.asp.net/thread/893099.aspx</link><pubDate>Thu, 14 Apr 2005 15:39:49 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:893099</guid><dc:creator>Scott Mitchell</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/893099.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=893099</wfw:commentRss><description>For those who are interested, &lt;a href="http://telerik.com/Default.aspx?PageId=2202&amp;amp;b119Y=zBWC"&gt;the workaround provided by Telerik&lt;/a&gt;&amp;nbsp;
was to put the eval() function in a try...catch block, which would have
the effect of suppressing the error message shown in IE.&amp;nbsp; It does
serve as a workaround, although seems like a bit of a hack.&amp;nbsp;
Stupid IE.&amp;nbsp;&lt;img src="/emoticons/emotion-4.gif" alt="Stick out tongue [:P]" /&gt; &lt;br&gt;</description></item><item><title>Re: onbeforeunload and eval Problems in IE</title><link>http://forums.asp.net/thread/892078.aspx</link><pubDate>Wed, 13 Apr 2005 21:03:24 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:892078</guid><dc:creator>BasicDatePicker</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/892078.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=892078</wfw:commentRss><description>&lt;P&gt;Hi Scott,&lt;/P&gt;
&lt;P&gt;We tried to come up with a solution, although nothing worked. dang.&lt;/P&gt;
&lt;P&gt;We did find that removing the eval() still produced the error. We're going to sleep on this and see what happens. If you come up with a solution or any other notes/comments, please post a follow-up.&lt;/P&gt;</description></item><item><title>onbeforeunload and eval Problems in IE</title><link>http://forums.asp.net/thread/890611.aspx</link><pubDate>Tue, 12 Apr 2005 20:40:02 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:890611</guid><dc:creator>Scott Mitchell</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/890611.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=890611</wfw:commentRss><description>&lt;P&gt;I am using the onbeforeunload client-side event to prompt a user when leaving a page after they have made changes, as discussed in this article of mine: &lt;A href="http://aspnet.4guysfromrolla.com/articles/101304-1.aspx"&gt;Using ASP.NET to Prompt a User to Save When Leaving a Page&lt;/A&gt;.&amp;nbsp; The problem I am having is with the page unloading via eval.&amp;nbsp; Specifically, I am using &lt;A href="http://telerik.com/Default.aspx?PageId=1415"&gt;telerik r.a.d. menu&lt;/A&gt;, which redirects users to another page via script like:&lt;/P&gt;
&lt;P&gt;eval('window.location.href='&lt;EM&gt;url of menu item&lt;/EM&gt;');&lt;/P&gt;
&lt;P&gt;When a user attempts to leave the page via a menu option, they get the prompt, as expected, but if they click Cancel there is a script error: Unspecified error on the line number of the eval() function call.&amp;nbsp; This works just fine in Firefox.&lt;/P&gt;
&lt;P&gt;I created a VERY simple page to test this out and confirm that it is the eval() function.&amp;nbsp; The page below, when visited through IE, displays the prompt and if I click Cancel I get the same Unspecified error. &lt;img src="/emoticons/emotion-6.gif" alt="Sad [:(]" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR&gt;&amp;nbsp; function foo()&lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "bar";&lt;BR&gt;&amp;nbsp; }&lt;BR&gt;&amp;nbsp; &lt;BR&gt;&amp;nbsp; window.onbeforeunload = foo;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; eval('window.location.href=\'http://www.google.com\'');&lt;BR&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;
&lt;P&gt;I was unable to find any info via Google as to if this is a well-known bug or if there are any workarounds.&amp;nbsp; Any ideas/suggestions/comments most appreciated.&amp;nbsp; (I'm posting this in the telerik forums as well; hopefully there's an easy way to get rid of those eval() statements, but I doubt it... &lt;img src="/emoticons/emotion-7.gif" alt="Tongue Tied [:S]" /&gt;)&lt;/P&gt;
&lt;P&gt;TIA&lt;/P&gt;</description></item></channel></rss>