<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>CodingClues - Latest Comments in Unobtrusive JavaScript: Separating Scripting From Markup</title><link>http://codingclues.disqus.com/</link><description></description><atom:link href="http://codingclues.disqus.com/unobtrusive_javascript_separating_scripting_from_markup/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 30 Sep 2008 04:50:21 -0000</lastBuildDate><item><title>Re: Unobtrusive JavaScript: Separating Scripting From Markup</title><link>http://codingclues.eu/2008/unobtrusive-javascript-separating-scripting-from-markup/#comment-3855783</link><description>&lt;p&gt;With a good JS framework the page should not be harder to debug when adding the event handlers in a seperate script block. Actually, from my experience it is easier to debug, as the frameworks all make sure your event handler will recieve the event as first argument, no matter if you call the input parameter event (will work in IE) or for example evt (will not work in IE when used in onclick-attribute).&lt;br&gt;Additionally, if you add your event handlers to single elements in an window.onload event handler (or even better, listen to dom:loaded), you avoid errors in event handler functions (imagine your onclick handler will change the innerHTML of another element that comes later in the DOM).&lt;br&gt;The non-functional period is not a valid point in my opinion. The whole point of unobtrusive JavaScript is to markup your page in such a way, that it will work with JavaScript turned off. The JavaScript will then add additional features that increase the usability or the efficency.&lt;br&gt;If your page doesn't "work" when the dom is completly loaded (and rendered), but the JavaScript isn't yet, then we are not talking about unobtrusive JavaScript. In that case you should hide elements that require JavaScript event handlers and show them via JavaScript after the event handlers were added.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">lino</dc:creator><pubDate>Tue, 30 Sep 2008 04:50:21 -0000</pubDate></item><item><title>Re: Unobtrusive JavaScript: Separating Scripting From Markup</title><link>http://codingclues.eu/2008/unobtrusive-javascript-separating-scripting-from-markup/#comment-3855782</link><description>&lt;p&gt;There's an overview of jQuery on &lt;a href="http://nettuts.com/javascript-ajax/15-resources-to-get-you-started-with-jquery-from-scratch/" rel="nofollow"&gt;http://nettuts.com/javascript-...&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Apparently, jQuery does exactly what unotrusive JavaScript is promising: To keep code separate from presentation and content.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sebastian</dc:creator><pubDate>Wed, 16 Jul 2008 08:02:09 -0000</pubDate></item></channel></rss>
