<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: IE code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 25 Jul 2008 02:25:44 GMT</pubDate>
    <description>DZone Snippets: IE code</description>
    <item>
      <title>Cross browser compatibility tip: Conditional Compile in IE</title>
      <link>http://snippets.dzone.com/posts/show/2107</link>
      <description>From: http://www.javascriptkit.com/javatutors/conditionalcompile.shtml&lt;br /&gt;Conditional Compilation of JScript/ JavaScript in IE&lt;br /&gt;&lt;br /&gt;In IE, there is a little known feature called conditional compilation. Supported since IE4, this feature starting getting some attention when it began showing up in some Ajax related JavaScripts. An absolute form of object detection, conditional compilation lets you dictate to IE whether to compile certain parts of your JScript or JavaScript code depending on predefined and user defined conditions. Think of it as conditional comments for your script that can also be molded to work gracefully with non IE browsers as well.&lt;br /&gt;&lt;br /&gt;Thanks to: http://www.vivabit.com/bollocks/2006/04/06/introducing-dom-builder#c856&lt;br /&gt;&lt;br /&gt;#48: Avatar kentaromiura / 19th April '06&lt;br /&gt;&lt;br /&gt;You could do like I do here: &lt;a hfef="http://freeforumzone.leonardo.it/viewmessaggi.aspx?f=19716&amp;idd=176"&gt;Crazy corners&lt;/a&gt; using IE conditional comment&lt;br /&gt;&lt;code&gt;&lt;br /&gt;var cn=&#226;&#8364;?class&#226;&#8364;?;&lt;br /&gt;&lt;br /&gt;/@cc_on&lt;br /&gt;&lt;br /&gt;cn="className";&lt;br /&gt;&lt;br /&gt;@/&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;so you use cn insted of class or classname _; bye&lt;br /&gt;</description>
      <pubDate>Fri, 26 May 2006 21:48:47 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/2107</guid>
      <author>MattScilipoti (Matt Scilipoti)</author>
    </item>
    <item>
      <title>Browser detect for IE versions</title>
      <link>http://snippets.dzone.com/posts/show/1726</link>
      <description>// is called when you want to test which version of IE a user has, returns true or false&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;function isIE(versionNumber) {&lt;br /&gt;var detect = navigator.userAgent.toLowerCase();&lt;br /&gt;if(!(navigator &amp;&amp; navigator.userAgent &amp;&amp; navigator.userAgent.toLowerCase)) {&lt;br /&gt;  	        return false;&lt;br /&gt;  	    } else {&lt;br /&gt;  	        if(detect.indexOf('msie') + 1) {&lt;br /&gt;  	            // browser is internet explorer&lt;br /&gt;  	            var ver = function() {&lt;br /&gt;  	                // http://msdn.microsoft.com/workshop/author/dhtml/overview/browserdetection.asp&lt;br /&gt;  	                // Returns the version of Internet Explorer or a -1&lt;br /&gt;  	                // (indicating the use of another browser).&lt;br /&gt;  	                var rv = -1; // Return value assumes failure&lt;br /&gt;  	                if (navigator.appName == 'Microsoft Internet Explorer') {&lt;br /&gt;  	                    var ua = navigator.userAgent;&lt;br /&gt;  	                    var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");&lt;br /&gt;  	                    if (re.exec(ua) != null) {&lt;br /&gt;  	                        rv = parseFloat( RegExp.$1 );&lt;br /&gt;  	                    }&lt;br /&gt;  	                }&lt;br /&gt;  	                return rv;&lt;br /&gt;  	            };&lt;br /&gt;  	            var valid = true;&lt;br /&gt;  	            // if the version can be found and the version is less than our version number it is invalid&lt;br /&gt;  	            if ((ver &gt; -1) &amp;&amp; (ver &lt; versionNumber)) {&lt;br /&gt;  	                valid = false;&lt;br /&gt;  	            }&lt;br /&gt;  	            return valid;&lt;br /&gt;  	        } else {&lt;br /&gt;  	            return false&lt;br /&gt;  	        }&lt;br /&gt;  	    }&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Wed, 22 Mar 2006 20:16:10 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1726</guid>
      <author>nataliedowne (Natalie Downe)</author>
    </item>
    <item>
      <title>Turn off image buttons / icons on your pages in IE</title>
      <link>http://snippets.dzone.com/posts/show/327</link>
      <description>Turn off the image buttons (when you hover over an image) and Smart Tags in IE:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;meta http-equiv="imagetoolbar" content="false" /&gt;&lt;br /&gt;&lt;meta name="MSSmartTagsPreventParsing" content="true" /&gt;&lt;/code&gt;</description>
      <pubDate>Thu, 26 May 2005 09:32:35 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/327</guid>
      <author>peter (Peter Cooperx)</author>
    </item>
    <item>
      <title>IE Automation in Python</title>
      <link>http://snippets.dzone.com/posts/show/289</link>
      <description>I try to dump my data out of a website. But it block my python's urllib bot. I tried other pure python libray but without success. So, I try a quicker route using IE automation.&lt;br /&gt;For general automation you should try 'watsup'. For IE, there is PAMIE.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&gt;&gt;&gt; from cPAMIE import PAMIE&lt;br /&gt;&gt;&gt;&gt; ie = PAMIE()&lt;br /&gt;&gt;&gt;&gt; ie.Navigate('www.google.com')   # go to google&lt;br /&gt;&gt;&gt;&gt; ie.SetTextBox('Python','q',0)       # search for python&lt;br /&gt;&gt;&gt;&gt; ie.ClickButton('btnG')               # Go!&lt;br /&gt;&lt;br /&gt;&gt;&gt;&gt; src = ie.pageText()                 # here it is&lt;br /&gt;&gt;&gt;&gt; cookie = ie.GetCookie()          # Ok, cookie is yummy&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;PAMIE is actually aimed for more of the testing work.&lt;br /&gt;But in this case it serves me fine.&lt;br /&gt;http://pamie.sourceforge.net/</description>
      <pubDate>Sun, 15 May 2005 15:12:04 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/289</guid>
      <author>korakot (Korakot Chaovavanich)</author>
    </item>
  </channel>
</rss>
