<?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: Adding Events to Adding Events in&#160;MooTools</title> <atom:link href="http://davidwalsh.name/mootools-add-event/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/mootools-add-event</link> <description>PHP, CSS, MooTools, jQuery, and Everything Else</description> <lastBuildDate>Fri, 19 Mar 2010 18:35:42 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: Simon</title><link>http://davidwalsh.name/mootools-add-event/comment-page-1#comment-16049</link> <dc:creator>Simon</dc:creator> <pubDate>Wed, 10 Feb 2010 23:07:35 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2848#comment-16049</guid> <description>This is a great little script but it completely fails you if you use Event Delegation.Your adding cursor pointer to, for example an entire list or the parent UL, instead of the list elements LI.I have one app that uses a click event on the body of the document and delegates the events depending on what div you clicked. So the entire document now has a pointer cursor.So be warned if you use Delegation techniques.</description> <content:encoded><![CDATA[<p>This is a great little script but it completely fails you if you use Event Delegation.</p><p>Your adding cursor pointer to, for example an entire list or the parent UL, instead of the list elements LI.</p><p>I have one app that uses a click event on the body of the document and delegates the events depending on what div you clicked. So the entire document now has a pointer cursor.</p><p>So be warned if you use Delegation techniques.</p> ]]></content:encoded> </item> <item><title>By: IE Conditional&#160;Comments &#124; Programming Blog</title><link>http://davidwalsh.name/mootools-add-event/comment-page-1#comment-15261</link> <dc:creator>IE Conditional&#160;Comments &#124; Programming Blog</dc:creator> <pubDate>Thu, 14 Jan 2010 14:16:23 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2848#comment-15261</guid> <description>[...] Adding Events to Adding Events in&#160;MooTools [...]</description> <content:encoded><![CDATA[<p>[...] Adding Events to Adding Events in&nbsp;MooTools [...]</p> ]]></content:encoded> </item> <item><title>By: Create a Simple Slideshow Using MooTools, Part II: Controls and&#160;Events &#124; Programming Blog</title><link>http://davidwalsh.name/mootools-add-event/comment-page-1#comment-14843</link> <dc:creator>Create a Simple Slideshow Using MooTools, Part II: Controls and&#160;Events &#124; Programming Blog</dc:creator> <pubDate>Mon, 28 Dec 2009 18:14:46 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2848#comment-14843</guid> <description>[...] Adding Events to Adding Events in&#160;MooTools [...]</description> <content:encoded><![CDATA[<p>[...] Adding Events to Adding Events in&nbsp;MooTools [...]</p> ]]></content:encoded> </item> <item><title>By: Five Questions with David Walsh Ajax Help W3C Tag</title><link>http://davidwalsh.name/mootools-add-event/comment-page-1#comment-14029</link> <dc:creator>Five Questions with David Walsh Ajax Help W3C Tag</dc:creator> <pubDate>Mon, 30 Nov 2009 08:19:00 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2848#comment-14029</guid> <description>[...] the user they can click on something! It bugged me so much that I wrote javascript custom events in both jQuery and MooTools that automatically gave elements with a click event the pointer [...]</description> <content:encoded><![CDATA[<p>[...] the user they can click on something! It bugged me so much that I wrote javascript custom events in both jQuery and MooTools that automatically gave elements with a click event the pointer [...]</p> ]]></content:encoded> </item> <item><title>By: Five Questions with David Walsh &#124; E Marketing, Web Design, Web Develop, SEO and SEM Egypt Blog</title><link>http://davidwalsh.name/mootools-add-event/comment-page-1#comment-13782</link> <dc:creator>Five Questions with David Walsh &#124; E Marketing, Web Design, Web Develop, SEO and SEM Egypt Blog</dc:creator> <pubDate>Thu, 19 Nov 2009 15:56:45 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2848#comment-13782</guid> <description>[...] the user they can click on something! It bugged me so much that I wrote javascript custom events in both jQuery and MooTools that automatically gave elements with a click event the pointer [...]</description> <content:encoded><![CDATA[<p>[...] the user they can click on something! It bugged me so much that I wrote javascript custom events in both jQuery and MooTools that automatically gave elements with a click event the pointer [...]</p> ]]></content:encoded> </item> <item><title>By: Patrick</title><link>http://davidwalsh.name/mootools-add-event/comment-page-1#comment-11447</link> <dc:creator>Patrick</dc:creator> <pubDate>Fri, 21 Aug 2009 12:21:15 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2848#comment-11447</guid> <description>What&#039;s the exact error message? I hope you&#039;re using IE8 to debug this error, or maybe even JSCompanion for IE.</description> <content:encoded><![CDATA[<p>What&#8217;s the exact error message? I hope you&#8217;re using IE8 to debug this error, or maybe even JSCompanion for IE.</p> ]]></content:encoded> </item> <item><title>By: Mattia</title><link>http://davidwalsh.name/mootools-add-event/comment-page-1#comment-11406</link> <dc:creator>Mattia</dc:creator> <pubDate>Thu, 20 Aug 2009 07:50:22 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2848#comment-11406</guid> <description>The error happened when I replace the content of a div that contains a DatePicker of ClientCide via an AJAX request. The ID and the &quot;name&quot; of the input text with DatePicker is &quot;end&#95;date&quot;.</description> <content:encoded><![CDATA[<p>The error happened when I replace the content of a div that contains a DatePicker of ClientCide via an AJAX request. The ID and the &#8220;name&#8221; of the input text with DatePicker is &#8220;end&#95;date&#8221;.</p> ]]></content:encoded> </item> <item><title>By: Patrick</title><link>http://davidwalsh.name/mootools-add-event/comment-page-1#comment-11403</link> <dc:creator>Patrick</dc:creator> <pubDate>Thu, 20 Aug 2009 00:05:06 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2848#comment-11403</guid> <description>Alright here&#039;s some things I noticed, that every mootools developer should keep in mind (these things were connected to my issues above..):Don&#039;t use names for input fields that might&#039;ve been reserved by mootools already - e.g. &quot;send&quot;!
Explanation: Mootools adds a method &quot;send()&quot; to elements (used with Request) - lots of people like to give their &lt;input type=&quot;submit&quot; /&gt; an additional name, so that they can check for a submitted form in php (if (!empty($&#95;POST[&quot;send&quot;]))...) - now &quot;send&quot; is already taken by mootools, giving this input another property named &quot;send&quot; would require an overwrite of an element property, which IE (no matter which version) will respond to with an &quot;The Object doesn&#039;t support...&quot; error - should be fixed in MooTools 2.0 but for now, simply avoid names or properties with &quot;reserved&quot; names (e.g. use &quot;sent&quot; instead).
Here&#039;s what I came up with for the &quot;adding link-cursor for clickable elements&quot;-trick (works without errors in any IE so far):/* update cursor on add/remove click event */
Element.Events.click = {Element.Events.click = {
base:&#039;click&#039;,
onAdd: function() {
if(this.getStyle &amp;&amp; this.get(&quot;tag&quot;) != &quot;a&quot; &amp;&amp; !this.match(&quot;input[type=text]&quot;) &amp;&amp; !this.match(&quot;input[type=password]&quot;)) {
this.store(&#039;original-cursor&#039;,this.getStyle(&#039;cursor&#039;));
this.setStyle(&#039;cursor&#039;,&#039;pointer&#039;);
}
},
onRemove: function() {
if(this.setStyle &amp;&amp; this.get(&quot;tag&quot;) != &quot;a&quot; &amp;&amp; !this.match(&quot;input[type=text]&quot;) &amp;&amp; !this.match(&quot;input[type=password]&quot;)) {
this.setStyle(&#039;cursor&#039;,this.retrieve(&#039;original-cursor&#039;));
}
}};It&#039;s still rough (the selector could be refined that makes sure that this style-switching only occurs on elements which aren&#039;t links already or aren&#039;t neither an input-element containing text or an input-element containing a password value (which should show a textinput cursor).Somehow (don&#039;t ask me why), this.setStyle (which results in setComputedStyle in IE), won&#039;t work in IE correctly when adding Events to Events, &quot;getStyle&quot; however worked...</description> <content:encoded><![CDATA[<p>Alright here&#8217;s some things I noticed, that every mootools developer should keep in mind (these things were connected to my issues above..):</p><p>Don&#8217;t use names for input fields that might&#8217;ve been reserved by mootools already &#8211; e.g. &#8220;send&#8221;!<br
/> Explanation: Mootools adds a method &#8220;send()&#8221; to elements (used with Request) &#8211; lots of people like to give their &lt;input type=&#8221;submit&#8221; /&gt; an additional name, so that they can check for a submitted form in php (if (!empty($&#95;POST["send"]))&#8230;) &#8211; now &#8220;send&#8221; is already taken by mootools, giving this input another property named &#8220;send&#8221; would require an overwrite of an element property, which IE (no matter which version) will respond to with an &#8220;The Object doesn&#8217;t support&#8230;&#8221; error &#8211; should be fixed in MooTools 2.0 but for now, simply avoid names or properties with &#8220;reserved&#8221; names (e.g. use &#8220;sent&#8221; instead).<br
/> Here&#8217;s what I came up with for the &#8220;adding link-cursor for clickable elements&#8221;-trick (works without errors in any IE so far):</p><p>/* update cursor on add/remove click event */<br
/> Element.Events.click = {</p><p>Element.Events.click = {<br
/> base:&#8217;click&#8217;,<br
/> onAdd: function() {<br
/> if(this.getStyle &amp;&amp; this.get(&#8220;tag&#8221;) != &#8220;a&#8221; &amp;&amp; !this.match(&#8220;input[type=text]&#8220;) &amp;&amp; !this.match(&#8220;input[type=password]&#8220;)) {<br
/> this.store(&#8216;original-cursor&#8217;,this.getStyle(&#8216;cursor&#8217;));<br
/> this.setStyle(&#8216;cursor&#8217;,'pointer&#8217;);<br
/> }<br
/> },<br
/> onRemove: function() {<br
/> if(this.setStyle &amp;&amp; this.get(&#8220;tag&#8221;) != &#8220;a&#8221; &amp;&amp; !this.match(&#8220;input[type=text]&#8220;) &amp;&amp; !this.match(&#8220;input[type=password]&#8220;)) {<br
/> this.setStyle(&#8216;cursor&#8217;,this.retrieve(&#8216;original-cursor&#8217;));<br
/> }<br
/> }</p><p>};</p><p>It&#8217;s still rough (the selector could be refined that makes sure that this style-switching only occurs on elements which aren&#8217;t links already or aren&#8217;t neither an input-element containing text or an input-element containing a password value (which should show a textinput cursor).</p><p>Somehow (don&#8217;t ask me why), this.setStyle (which results in setComputedStyle in IE), won&#8217;t work in IE correctly when adding Events to Events, &#8220;getStyle&#8221; however worked&#8230;</p> ]]></content:encoded> </item> <item><title>By: Mattia</title><link>http://davidwalsh.name/mootools-add-event/comment-page-1#comment-11384</link> <dc:creator>Mattia</dc:creator> <pubDate>Wed, 19 Aug 2009 08:48:43 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2848#comment-11384</guid> <description>@Patrick: I&#039;ve the error that you explained on Internet Explorer 8 but I don&#039;t understand how I can solve it.</description> <content:encoded><![CDATA[<p>@Patrick: I&#8217;ve the error that you explained on Internet Explorer 8 but I don&#8217;t understand how I can solve it.</p> ]]></content:encoded> </item> <item><title>By: Introducing: MooButtons &#124; dfr.me</title><link>http://davidwalsh.name/mootools-add-event/comment-page-1#comment-10947</link> <dc:creator>Introducing: MooButtons &#124; dfr.me</dc:creator> <pubDate>Sat, 01 Aug 2009 22:19:33 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2848#comment-10947</guid> <description>[...] a link by accident (A dirty great red button usually gets the attention it deserves!). And as David Walsh says, it&#8217;s vital that the user knows they&#8217;ve clicked it, and that they even can click on it. [...]</description> <content:encoded><![CDATA[<p>[...] a link by accident (A dirty great red button usually gets the attention it deserves!). And as David Walsh says, it&#8217;s vital that the user knows they&#8217;ve clicked it, and that they even can click on it. [...]</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 7/19 queries in 0.043 seconds using disk

Served from: davidwalsh.name @ 2010-03-19 22:38:21 -->