<?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: Do not use the alert function in javascript</title>
	<atom:link href="http://www.javascriptkata.com/2007/05/16/do-not-use-the-alert-function-in-javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javascriptkata.com/2007/05/16/do-not-use-the-alert-function-in-javascript/</link>
	<description>Advanced katas for javascripters</description>
	<lastBuildDate>Fri, 30 Jul 2010 18:10:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Joe Dev</title>
		<link>http://www.javascriptkata.com/2007/05/16/do-not-use-the-alert-function-in-javascript/comment-page-1/#comment-851</link>
		<dc:creator>Joe Dev</dc:creator>
		<pubDate>Thu, 03 Dec 2009 21:52:04 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=40#comment-851</guid>
		<description>No one can answer the key point that many developers have. How do you stop execution of javascript until the user clicks something? For example you wait for them to read the alert message then navigate them away to another page. Every replacement solution I have found cannot recreate this, it displays the pseudo alert for a second then navigates away without requiring the user to hit ok first.</description>
		<content:encoded><![CDATA[<p>No one can answer the key point that many developers have. How do you stop execution of javascript until the user clicks something? For example you wait for them to read the alert message then navigate them away to another page. Every replacement solution I have found cannot recreate this, it displays the pseudo alert for a second then navigates away without requiring the user to hit ok first.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dave</title>
		<link>http://www.javascriptkata.com/2007/05/16/do-not-use-the-alert-function-in-javascript/comment-page-1/#comment-765</link>
		<dc:creator>dave</dc:creator>
		<pubDate>Tue, 30 Jun 2009 19:58:16 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=40#comment-765</guid>
		<description>A few years ago, I developed a server side engine to display standard forms on a web page. everything was driven by a data dictionary and each element has an empty DIV immediately below it with a known name, typically &#039;MSGelementname&#039; when an error  occurs, I use document.getElementById(&#039;MSGelementname&#039;).innerHTML=&#039;error msg&#039;. This inserts a message immediately after the element, drawing the user&#039;s attention directly to the problem. Using the same technique, I also insert a message near the submit button alerting the user to he error(s). This allowed me to change all of the form&#039;s alerts to &#039;document.getElementById(&quot;MSGelementname&quot;).innerHTML=errorMsg;&#039;.

In the end, it added one div per element to the HTML, one div near the submit button, and only a few lines of JavaScript.  No more alerts, just a friendly interface. It does require more work from the programmer, but that&#039;s what we&#039;re here for.</description>
		<content:encoded><![CDATA[<p>A few years ago, I developed a server side engine to display standard forms on a web page. everything was driven by a data dictionary and each element has an empty DIV immediately below it with a known name, typically &#8216;MSGelementname&#8217; when an error  occurs, I use document.getElementById(&#8216;MSGelementname&#8217;).innerHTML=&#8217;error msg&#8217;. This inserts a message immediately after the element, drawing the user&#8217;s attention directly to the problem. Using the same technique, I also insert a message near the submit button alerting the user to he error(s). This allowed me to change all of the form&#8217;s alerts to &#8216;document.getElementById(&#8220;MSGelementname&#8221;).innerHTML=errorMsg;&#8217;.</p>
<p>In the end, it added one div per element to the HTML, one div near the submit button, and only a few lines of JavaScript.  No more alerts, just a friendly interface. It does require more work from the programmer, but that&#8217;s what we&#8217;re here for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lupus Michaelis</title>
		<link>http://www.javascriptkata.com/2007/05/16/do-not-use-the-alert-function-in-javascript/comment-page-1/#comment-549</link>
		<dc:creator>Lupus Michaelis</dc:creator>
		<pubDate>Fri, 18 Jul 2008 14:39:08 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=40#comment-549</guid>
		<description>You&#039;re hard against the message boxes. They can be useful, in some cases. In a web application, it can be needed. But in web site, I agree that message boxes are as annoying as popups.

So, FYI, you can read and write through javascript embeded in a web browser. In Gecko, you have to ask user for that privilege, and in MSIE you just use the right ActiveX (so MSIE must ask the user for... at least).

(Sorry for my english, I&#039;m french)</description>
		<content:encoded><![CDATA[<p>You&#8217;re hard against the message boxes. They can be useful, in some cases. In a web application, it can be needed. But in web site, I agree that message boxes are as annoying as popups.</p>
<p>So, FYI, you can read and write through javascript embeded in a web browser. In Gecko, you have to ask user for that privilege, and in MSIE you just use the right ActiveX (so MSIE must ask the user for&#8230; at least).</p>
<p>(Sorry for my english, I&#8217;m french)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Whipping Teach</title>
		<link>http://www.javascriptkata.com/2007/05/16/do-not-use-the-alert-function-in-javascript/comment-page-1/#comment-405</link>
		<dc:creator>Whipping Teach</dc:creator>
		<pubDate>Tue, 15 Jan 2008 04:32:04 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=40#comment-405</guid>
		<description>I always love the alert box cuz it snaps the reader&#039;s attention.

Very useful and annoying if you was going to just make an surprise. ^^

Thanks for the light box code though!!!! It does work subtley...</description>
		<content:encoded><![CDATA[<p>I always love the alert box cuz it snaps the reader&#8217;s attention.</p>
<p>Very useful and annoying if you was going to just make an surprise. ^^</p>
<p>Thanks for the light box code though!!!! It does work subtley&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daeghran</title>
		<link>http://www.javascriptkata.com/2007/05/16/do-not-use-the-alert-function-in-javascript/comment-page-1/#comment-246</link>
		<dc:creator>Daeghran</dc:creator>
		<pubDate>Wed, 04 Jul 2007 09:21:12 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=40#comment-246</guid>
		<description>Interesting discussion.
But I have a question...

What if you want to stop execution/parsing of the current page by the browser until the user clicks &quot;OK&quot;?  I wish there was another way but I can&#039;t think of any way to do his except by using the alert function.

Is there any other way of doing this?</description>
		<content:encoded><![CDATA[<p>Interesting discussion.<br />
But I have a question&#8230;</p>
<p>What if you want to stop execution/parsing of the current page by the browser until the user clicks &#8220;OK&#8221;?  I wish there was another way but I can&#8217;t think of any way to do his except by using the alert function.</p>
<p>Is there any other way of doing this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gentle Geek</title>
		<link>http://www.javascriptkata.com/2007/05/16/do-not-use-the-alert-function-in-javascript/comment-page-1/#comment-245</link>
		<dc:creator>Gentle Geek</dc:creator>
		<pubDate>Tue, 26 Jun 2007 17:43:30 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=40#comment-245</guid>
		<description>Dan... you can use Javascript... with or without a library... to log alert-type info into a text-field or pseudo-window on the same page, and then once the event or process is complete, the user can manually copy the text in this field, and paste into a NotePad or WordPad file.  I do this often when I am debugging a program.

You can set something up with Prototype or dojo or jsQuery..

BUT, I have found 2 tools that do just the debug-tracing activity quite easily.

jsTrace
  http://www.easy-designs.net/code/jsTrace/

jsTracer
  http://jstracer.sourceforge.net/</description>
		<content:encoded><![CDATA[<p>Dan&#8230; you can use Javascript&#8230; with or without a library&#8230; to log alert-type info into a text-field or pseudo-window on the same page, and then once the event or process is complete, the user can manually copy the text in this field, and paste into a NotePad or WordPad file.  I do this often when I am debugging a program.</p>
<p>You can set something up with Prototype or dojo or jsQuery..</p>
<p>BUT, I have found 2 tools that do just the debug-tracing activity quite easily.</p>
<p>jsTrace<br />
  <a href="http://www.easy-designs.net/code/jsTrace/" rel="nofollow">http://www.easy-designs.net/code/jsTrace/</a></p>
<p>jsTracer<br />
  <a href="http://jstracer.sourceforge.net/" rel="nofollow">http://jstracer.sourceforge.net/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.javascriptkata.com/2007/05/16/do-not-use-the-alert-function-in-javascript/comment-page-1/#comment-244</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 15 Jun 2007 12:57:11 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=40#comment-244</guid>
		<description>@sree, you can&#039;t create any file in javascript. It would be a big security problem.</description>
		<content:encoded><![CDATA[<p>@sree, you can&#8217;t create any file in javascript. It would be a big security problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sree</title>
		<link>http://www.javascriptkata.com/2007/05/16/do-not-use-the-alert-function-in-javascript/comment-page-1/#comment-243</link>
		<dc:creator>sree</dc:creator>
		<pubDate>Fri, 15 Jun 2007 12:31:27 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=40#comment-243</guid>
		<description>Hi can we log alert text into a file
for eg,
I &#039;ve gor alert(responseXML) where response
is too huge to read and debug

how can we log this into a file or some
place where it is readable?</description>
		<content:encoded><![CDATA[<p>Hi can we log alert text into a file<br />
for eg,<br />
I &#8216;ve gor alert(responseXML) where response<br />
is too huge to read and debug</p>
<p>how can we log this into a file or some<br />
place where it is readable?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam "DaMule" Hennessy</title>
		<link>http://www.javascriptkata.com/2007/05/16/do-not-use-the-alert-function-in-javascript/comment-page-1/#comment-242</link>
		<dc:creator>Sam "DaMule" Hennessy</dc:creator>
		<pubDate>Fri, 25 May 2007 20:02:38 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=40#comment-242</guid>
		<description>The alert is also a blocking operation so your asynchronous calls will all have to wait until the alert is cleared.</description>
		<content:encoded><![CDATA[<p>The alert is also a blocking operation so your asynchronous calls will all have to wait until the alert is cleared.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mick</title>
		<link>http://www.javascriptkata.com/2007/05/16/do-not-use-the-alert-function-in-javascript/comment-page-1/#comment-241</link>
		<dc:creator>Mick</dc:creator>
		<pubDate>Fri, 25 May 2007 14:19:10 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=40#comment-241</guid>
		<description>This is something that has never crossed my mind, even though alert boxes annoy me when I get them. I&#039;m gonna start changing all my form checker scripts with this kata.</description>
		<content:encoded><![CDATA[<p>This is something that has never crossed my mind, even though alert boxes annoy me when I get them. I&#8217;m gonna start changing all my form checker scripts with this kata.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
