<?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: Break out of infinite alert() popups!</title> <atom:link href="http://www.puremango.co.uk/2010/02/break-out-of-infinite-alert-popups/feed/" rel="self" type="application/rss+xml" /><link>http://www.puremango.co.uk/2010/02/break-out-of-infinite-alert-popups/</link> <description>innovative coding, tutorials, web stuff. celebrating 6 years online.</description> <lastBuildDate>Mon, 06 Feb 2012 07:31:40 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Howard Yeend</title><link>http://www.puremango.co.uk/2010/02/break-out-of-infinite-alert-popups/comment-page-1/#comment-13048</link> <dc:creator>Howard Yeend</dc:creator> <pubDate>Tue, 25 May 2010 20:15:26 +0000</pubDate> <guid
isPermaLink="false">http://www.puremango.co.uk/?p=759#comment-13048</guid> <description>very true. I suggest installing the extension and using console.log for your own debugging.</description> <content:encoded><![CDATA[<p>very true. I suggest installing the extension and using console.log for your own debugging.</p> ]]></content:encoded> </item> <item><title>By: David</title><link>http://www.puremango.co.uk/2010/02/break-out-of-infinite-alert-popups/comment-page-1/#comment-13028</link> <dc:creator>David</dc:creator> <pubDate>Tue, 25 May 2010 10:53:21 +0000</pubDate> <guid
isPermaLink="false">http://www.puremango.co.uk/?p=759#comment-13028</guid> <description>If I hit Enter to submit a form or do some action and that sends me into the &quot;infinite&quot; alert loop, then holding Enter will most likely cause me to redo the action after I&#039;ve gone through all the alerts. Then I will have to go through them again.... And what if I&#039;m trying to find out where/why my code is looping infinitely and causing my browser to freeze?  At that point, we can assume that if I&#039;ve found it by putting the alert in the right spot, that alert will literally loop infinitely.  I need some mechanism to defeat the modality of the alert and stop the code.  Generally, closing the browser (browser tab in this case) is the only option.</description> <content:encoded><![CDATA[<p>If I hit Enter to submit a form or do some action and that sends me into the &#8220;infinite&#8221; alert loop, then holding Enter will most likely cause me to redo the action after I&#8217;ve gone through all the alerts. Then I will have to go through them again&#8230;. And what if I&#8217;m trying to find out where/why my code is looping infinitely and causing my browser to freeze?  At that point, we can assume that if I&#8217;ve found it by putting the alert in the right spot, that alert will literally loop infinitely.  I need some mechanism to defeat the modality of the alert and stop the code.  Generally, closing the browser (browser tab in this case) is the only option.</p> ]]></content:encoded> </item> <item><title>By: Del</title><link>http://www.puremango.co.uk/2010/02/break-out-of-infinite-alert-popups/comment-page-1/#comment-9050</link> <dc:creator>Del</dc:creator> <pubDate>Sat, 20 Mar 2010 18:19:39 +0000</pubDate> <guid
isPermaLink="false">http://www.puremango.co.uk/?p=759#comment-9050</guid> <description>Chrome has it&#039;s own DOM inspector / Profiler etc built it, so you can write to the console in chrome too. Although, Firebug has so many features that i can&#039;t quite let go of yet.
Nice Post H.</description> <content:encoded><![CDATA[<p>Chrome has it&#8217;s own DOM inspector / Profiler etc built it, so you can write to the console in chrome too. Although, Firebug has so many features that i can&#8217;t quite let go of yet.</p><p>Nice Post H.</p> ]]></content:encoded> </item> <item><title>By: Fortunat</title><link>http://www.puremango.co.uk/2010/02/break-out-of-infinite-alert-popups/comment-page-1/#comment-7920</link> <dc:creator>Fortunat</dc:creator> <pubDate>Wed, 17 Feb 2010 21:44:43 +0000</pubDate> <guid
isPermaLink="false">http://www.puremango.co.uk/?p=759#comment-7920</guid> <description>Great trick :D thanks for the tip!
Though simply holding Enter has always worked for me... I wonder why everyone insists on clicking their mouse to death, when you can just hold Enter...
Just a though, of course. Your trick pwns either way ;-)</description> <content:encoded><![CDATA[<p>Great trick :D thanks for the tip!<br
/> Though simply holding Enter has always worked for me&#8230; I wonder why everyone insists on clicking their mouse to death, when you can just hold Enter&#8230;<br
/> Just a though, of course. Your trick pwns either way ;-)</p> ]]></content:encoded> </item> <item><title>By: Ms2ger</title><link>http://www.puremango.co.uk/2010/02/break-out-of-infinite-alert-popups/comment-page-1/#comment-7917</link> <dc:creator>Ms2ger</dc:creator> <pubDate>Wed, 17 Feb 2010 19:05:32 +0000</pubDate> <guid
isPermaLink="false">http://www.puremango.co.uk/?p=759#comment-7917</guid> <description>And say that Opera&#039;s got that for ages...</description> <content:encoded><![CDATA[<p>And say that Opera&#8217;s got that for ages&#8230;</p> ]]></content:encoded> </item> <item><title>By: Howard Yeend</title><link>http://www.puremango.co.uk/2010/02/break-out-of-infinite-alert-popups/comment-page-1/#comment-7915</link> <dc:creator>Howard Yeend</dc:creator> <pubDate>Wed, 17 Feb 2010 17:40:40 +0000</pubDate> <guid
isPermaLink="false">http://www.puremango.co.uk/?p=759#comment-7915</guid> <description>I did say pretty much that in the post, you know ;-P
(edit: but yes, your solution negates the &quot;script won&#039;t execute&quot; problem I mentioned)
edit:
actually, I prefer:
&lt;pre lang=&quot;PHP&quot;&gt;
if(!console) {
// provide some rough kind of console behaviour
var console = function(){
var my = {
log: function(stuff) {
document.write(stuff+&quot;&lt;br /&gt;&quot;);
// (or alert if you prefer)
}
};
return my;
}();
}
&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>I did say pretty much that in the post, you know ;-P</p><p>(edit: but yes, your solution negates the &#8220;script won&#8217;t execute&#8221; problem I mentioned)</p><p>edit:</p><p>actually, I prefer:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>console<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// provide some rough kind of console behaviour</span>
    <span style="color: #000000; font-weight: bold;">var</span> console <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">var</span> my <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #990000;">log</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>stuff<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                document<span style="color: #339933;">.</span>write<span style="color: #009900;">&#40;</span>stuff<span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;&lt;br /&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #666666; font-style: italic;">// (or alert if you prefer)</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">return</span> my<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div> ]]></content:encoded> </item> <item><title>By: Howard Yeend</title><link>http://www.puremango.co.uk/2010/02/break-out-of-infinite-alert-popups/comment-page-1/#comment-7914</link> <dc:creator>Howard Yeend</dc:creator> <pubDate>Wed, 17 Feb 2010 17:30:09 +0000</pubDate> <guid
isPermaLink="false">http://www.puremango.co.uk/?p=759#comment-7914</guid> <description>have changed to 50 - sorry if I killed your browser ;0) Thanks for letting me know.</description> <content:encoded><![CDATA[<p>have changed to 50 &#8211; sorry if I killed your browser ;0) Thanks for letting me know.</p> ]]></content:encoded> </item> <item><title>By: Howard Yeend</title><link>http://www.puremango.co.uk/2010/02/break-out-of-infinite-alert-popups/comment-page-1/#comment-7913</link> <dc:creator>Howard Yeend</dc:creator> <pubDate>Wed, 17 Feb 2010 17:25:35 +0000</pubDate> <guid
isPermaLink="false">http://www.puremango.co.uk/?p=759#comment-7913</guid> <description>Hmm, how do you close tabs via the keyboard on a mac?</description> <content:encoded><![CDATA[<p>Hmm, how do you close tabs via the keyboard on a mac?</p> ]]></content:encoded> </item> <item><title>By: kpobococ</title><link>http://www.puremango.co.uk/2010/02/break-out-of-infinite-alert-popups/comment-page-1/#comment-7912</link> <dc:creator>kpobococ</dc:creator> <pubDate>Wed, 17 Feb 2010 17:00:35 +0000</pubDate> <guid
isPermaLink="false">http://www.puremango.co.uk/?p=759#comment-7912</guid> <description>Latest Chrome version has a pretty decent developing tools. They even have stuff that firebug does not have yet.</description> <content:encoded><![CDATA[<p>Latest Chrome version has a pretty decent developing tools. They even have stuff that firebug does not have yet.</p> ]]></content:encoded> </item> <item><title>By: kpobococ</title><link>http://www.puremango.co.uk/2010/02/break-out-of-infinite-alert-popups/comment-page-1/#comment-7911</link> <dc:creator>kpobococ</dc:creator> <pubDate>Wed, 17 Feb 2010 16:59:25 +0000</pubDate> <guid
isPermaLink="false">http://www.puremango.co.uk/?p=759#comment-7911</guid> <description>Oh, come on, stop living in the stone age:
var mylog = function(whatever) {
if (window.console &amp;&amp; console.log) console.log(whatever);
}</description> <content:encoded><![CDATA[<p>Oh, come on, stop living in the stone age:<br
/> var mylog = function(whatever) {<br
/> if (window.console &amp;&amp; console.log) console.log(whatever);<br
/> }</p> ]]></content:encoded> </item> </channel> </rss>
