<?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/"
xmlns:series="http://unfoldingneurons.com/"
> <channel><title>Comments on: Prevent Internet Explorer&#8217;s Default Image Dragging&#160;Action</title> <atom:link href="http://davidwalsh.name/prevent-internet-explorers-default-image-dragging-action/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/prevent-internet-explorers-default-image-dragging-action</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Thu, 09 Feb 2012 15:40:33 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>By: 411 New York</title><link>http://davidwalsh.name/prevent-internet-explorers-default-image-dragging-action/comment-page-1#comment-27346</link> <dc:creator>411 New York</dc:creator> <pubDate>Tue, 25 Oct 2011 15:35:36 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=250#comment-27346</guid> <description>We had this enabled in a .js file then had each page call on the file. It worked great but now we noticed one site copied an entire page of ours so we tried to do it our self in IE9 and was able to copy the same info.Does that mean IE9 now ignores it or is there a bug in IE9?</description> <content:encoded><![CDATA[<p>We had this enabled in a .js file then had each page call on the file. It worked great but now we noticed one site copied an entire page of ours so we tried to do it our self in IE9 and was able to copy the same info.</p><p>Does that mean IE9 now ignores it or is there a bug in IE9?</p> ]]></content:encoded> </item> <item><title>By: Mendi Meyer</title><link>http://davidwalsh.name/prevent-internet-explorers-default-image-dragging-action/comment-page-1#comment-24313</link> <dc:creator>Mendi Meyer</dc:creator> <pubDate>Sat, 04 Jun 2011 09:43:48 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=250#comment-24313</guid> <description>Hey I have the solution that all browsers work with...  doesn&#039;t work for firefox if you have a lot of code so I came up with this. By adding an &quot;!important&quot; statement it tells it that it is the most important code to find so it refers to it before everything else:Also prevents right clicking and makes it un-selectable.</description> <content:encoded><![CDATA[<p>Hey I have the solution that all browsers work with&#8230;  doesn&#8217;t work for firefox if you have a lot of code so I came up with this. By adding an &#8220;!important&#8221; statement it tells it that it is the most important code to find so it refers to it before everything else:</p><p>Also prevents right clicking and makes it un-selectable.</p> ]]></content:encoded> </item> <item><title>By: Paul</title><link>http://davidwalsh.name/prevent-internet-explorers-default-image-dragging-action/comment-page-1#comment-19944</link> <dc:creator>Paul</dc:creator> <pubDate>Mon, 13 Sep 2010 14:27:48 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=250#comment-19944</guid> <description>Thank you! Finally a solution that is simple, and works on all browsers!</description> <content:encoded><![CDATA[<p>Thank you! Finally a solution that is simple, and works on all browsers!</p> ]]></content:encoded> </item> <item><title>By: Eric</title><link>http://davidwalsh.name/prevent-internet-explorers-default-image-dragging-action/comment-page-1#comment-8941</link> <dc:creator>Eric</dc:creator> <pubDate>Tue, 28 Apr 2009 14:42:23 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=250#comment-8941</guid> <description>Thank you for this concise and helpful tidbit.  It saved me additional searching.   For those looking to inhibit dragging behavior on a individual element (an image in this example) rather than the whole document, try:&#160;&#160;&lt;img src=&quot;blah.jpg&quot; ondragstart=&quot;return false&quot; /&gt;</description> <content:encoded><![CDATA[<p>Thank you for this concise and helpful tidbit.  It saved me additional searching.   For those looking to inhibit dragging behavior on a individual element (an image in this example) rather than the whole document, try:&nbsp;&nbsp;&lt;img src=&#8221;blah.jpg&#8221; ondragstart=&#8221;return false&#8221; /&gt;</p> ]]></content:encoded> </item> <item><title>By: Callum Johnson</title><link>http://davidwalsh.name/prevent-internet-explorers-default-image-dragging-action/comment-page-1#comment-8441</link> <dc:creator>Callum Johnson</dc:creator> <pubDate>Fri, 27 Mar 2009 18:17:23 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=250#comment-8441</guid> <description>Im trying to prevent a component of my navi bar to not be dragged.I&#039;m using://Home Buttonfunction mouseOverHome()
{
document.getElementById(&quot;home&quot;).src =&quot;images/navigation bar/homeOUT.jpg&quot;;
document.ondragstart = function () { return false; };
}
function mouseOutHome()
{
document.getElementById(&quot;home&quot;).src =&quot;images/navigation bar/home.jpg&quot;;
document.ondragstart = function () { return false; };
}So why does this not prevent the image from being dragged in FF?</description> <content:encoded><![CDATA[<p>Im trying to prevent a component of my navi bar to not be dragged.</p><p>I&#8217;m using:</p><p>//Home Button</p><p>function mouseOverHome()<br
/> {<br
/> document.getElementById(&#8220;home&#8221;).src =&#8221;images/navigation bar/homeOUT.jpg&#8221;;<br
/> document.ondragstart = function () { return false; };<br
/> }<br
/> function mouseOutHome()<br
/> {<br
/> document.getElementById(&#8220;home&#8221;).src =&#8221;images/navigation bar/home.jpg&#8221;;<br
/> document.ondragstart = function () { return false; };<br
/> }</p><p>So why does this not prevent the image from being dragged in FF?</p> ]]></content:encoded> </item> <item><title>By: Jerome</title><link>http://davidwalsh.name/prevent-internet-explorers-default-image-dragging-action/comment-page-1#comment-2436</link> <dc:creator>Jerome</dc:creator> <pubDate>Thu, 24 Jul 2008 11:05:13 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=250#comment-2436</guid> <description>Thanx a lot for the tip it helped me a lot !J</description> <content:encoded><![CDATA[<p>Thanx a lot for the tip it helped me a lot !</p><p>J</p> ]]></content:encoded> </item> <item><title>By: Jeremy</title><link>http://davidwalsh.name/prevent-internet-explorers-default-image-dragging-action/comment-page-1#comment-1209</link> <dc:creator>Jeremy</dc:creator> <pubDate>Fri, 16 May 2008 20:38:07 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=250#comment-1209</guid> <description>@David Nice tip - short, but useful!@Bryan - You are correct...document.ondragstart is actually a JScript (Microsoft) only method.  I am pretty certain it is not defined in the ECMAScript documentation.  David&#039;s script will work just fine in non MS browsers too, though, since JavaScript allows object augmentation.  In non MS browsers, this script will simply add a new method object to the document object - which is mostly inconsequential.  I suppose if you&#039;re concerned about modifying the document hash, you could always try something like this:if(document.ondragstart)
{
document.ondragstart = function() { return false; };
}</description> <content:encoded><![CDATA[<p>@David Nice tip &#8211; short, but useful!</p><p>@Bryan &#8211; You are correct&#8230;</p><p>document.ondragstart is actually a JScript (Microsoft) only method.  I am pretty certain it is not defined in the ECMAScript documentation.  David&#8217;s script will work just fine in non MS browsers too, though, since JavaScript allows object augmentation.  In non MS browsers, this script will simply add a new method object to the document object &#8211; which is mostly inconsequential.  I suppose if you&#8217;re concerned about modifying the document hash, you could always try something like this:</p><p>if(document.ondragstart)<br
/> {<br
/> document.ondragstart = function() { return false; };<br
/> }</p> ]]></content:encoded> </item> <item><title>By: Bryan</title><link>http://davidwalsh.name/prevent-internet-explorers-default-image-dragging-action/comment-page-1#comment-1208</link> <dc:creator>Bryan</dc:creator> <pubDate>Fri, 16 May 2008 17:03:04 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=250#comment-1208</guid> <description>I think your header there is a touch misleading. Nothing in that code snippet requires moo unless ondragstart is a mootools added event.The mootools version I imagine would look something like..window.addEvent(&#039;dragstart&#039;,function(e) { if(e) { var evt = new Event(e).stop(); } });just my two bits.</description> <content:encoded><![CDATA[<p>I think your header there is a touch misleading. Nothing in that code snippet requires moo unless ondragstart is a mootools added event.</p><p>The mootools version I imagine would look something like..</p><p>window.addEvent(&#8216;dragstart&#8217;,function(e) { if(e) { var evt = new Event(e).stop(); } });</p><p>just my two bits.</p> ]]></content:encoded> </item> <item><title>By: Eric Wendelin</title><link>http://davidwalsh.name/prevent-internet-explorers-default-image-dragging-action/comment-page-1#comment-1206</link> <dc:creator>Eric Wendelin</dc:creator> <pubDate>Fri, 16 May 2008 15:44:35 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=250#comment-1206</guid> <description>Nice and simple. Just the way I like it!</description> <content:encoded><![CDATA[<p>Nice and simple. Just the way I like 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: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 1/16 queries in 0.009 seconds using disk: basic
Object Caching 800/801 objects using disk: basic

Served from: davidwalsh.name @ 2012-02-09 12:40:20 -->
