<?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: 7 JavaScript Differences Between Firefox &amp; IE</title>
	<atom:link href="http://www.impressivewebs.com/7-javascript-differences-between-firefox-ie/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.impressivewebs.com/7-javascript-differences-between-firefox-ie/</link>
	<description>Web Design Articles &#38; Tutorials. To make the web impressive.</description>
	<lastBuildDate>Tue, 07 Feb 2012 20:16:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: anjay</title>
		<link>http://www.impressivewebs.com/7-javascript-differences-between-firefox-ie/#comment-6848</link>
		<dc:creator>anjay</dc:creator>
		<pubDate>Thu, 09 Sep 2010 06:23:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.impressivewebs.com/?p=154#comment-6848</guid>
		<description>If you  pre-load images and load them dynamically before into your interface, only the first &#039;window.onload&#039; works if you refresh the page all your images disappear in IE  only FF works correctly. addd your own images to this script and modify the imgNames array
	var imgNames = [&quot;Refresh&quot;, &quot;Telephone&quot;, &quot;StaffPortal&quot;, &quot;SRContractsdb&quot;, &quot;StatApp&quot;, &quot;MapApp&quot;, &quot;AdminForms&quot;, &quot;Calendar&quot;, &quot;ARVTdb&quot;, &quot;Exit&quot; ];








var initMenu= function(){
  
  	var table=document.createElement(&#039;table&#039;)
  		table.id=&quot;myTable&quot;
  		table.align=&#039;center&#039;
  		
  	var imgNames = [&quot;Refresh&quot;, &quot;Telephone&quot;, &quot;StaffPortal&quot;, &quot;SRContractsdb&quot;, &quot;StatApp&quot;, &quot;MapApp&quot;, &quot;AdminForms&quot;, &quot;Calendar&quot;, &quot;ARVTdb&quot;, &quot;Exit&quot; ];
	var imgObjects = [];
	
	var objBotMenu=document.getElementById(&#039;botmenu&#039;)
    var tbody = document.createElement(&quot;tbody&quot;);
    var row = document.createElement(&quot;tr&quot;)
    var td = document.createElement(&quot;td&quot;)
    		td.id=&#039;mid&#039;
    
    	  row.appendChild(td);
      	tbody.appendChild(row);
   	  	table.appendChild(tbody);
//document.body.appendChild(table);

objBotMenu.appendChild(table);

for (var i = 0; i &lt; imgNames.length; i++){
  imgObjects[i] = new Image();
  imgObjects[i].src = &#039;imgs/&#039;+ imgNames[i] + &#039;.png&#039;;
  imgObjects[i].onload = function(){
  for (var i = 0; i &lt; imgNames.length; i++){
    td.appendChild(imgObjects[i]);
      imgObjects[i].className=&quot;imgIcon&quot;;
      var imgleft=imgObjects[i].left
                   imgObjects[i].onmouseover=function() {// function number 1
                  var params = findPos(this);
             var capsLayer= document.createElement(&quot;span&quot;)
             capsLayer.style.position=&quot;absolute&quot;;
             capsLayer.style.left= params[0]-310 ;
    		 capsLayer.id=&#039;capsLayerId&#039;;
     		capsLayer.innerHTML= &#039;&#039;+eval(imgNames[i])+&#039;&#039;;
    	  td.appendChild(capsLayer);

             var capsLayer=
             this.position=&quot;absolute&quot;;
             
             
              //this.parentNode.verticalAlign=&quot;top&quot;//**************position
             
             if(!this.nextSibling){
             this.className=&quot;thumbImg&quot;;
             
             }else{
             
             this.nextSibling.className=&quot;mideuim&quot;//function code /#/1
             }
             
             if(!this.previousSibling){
             this.className=&quot;thumbImg&quot;

             }else{
               
              
			 this.previousSibling.className=&quot;mideuim&quot;

             }

             this.className=&quot;thumbImg&quot;	
             				
             this.onmouseout=function() {  
             var capsLayer=document.getElementById(&#039;capsLayerId&#039;);
if(capsLayer)
capsLayer.parentNode.removeChild(capsLayer)
             		 this.className=&quot;imgIcon&quot;;  
             		

             			// this.parentNode.verticalAlign=&quot;top&quot;;//******************position
             			 				
 if(!this.nextSibling){this.className=&quot;imgIcon&quot;
 						

 }else{
             this.nextSibling.className=&quot;imgIcon&quot;//function code /#/1
            

             }
             
             if(!this.previousSibling){
             this.className=&quot;imgIcon&quot;
        

             }else{
               //function code /#/2
			 this.previousSibling.className=&quot;imgIcon&quot;
			
             }

			
             							};

             					};

    			
    			}
  
			}
	}
	};
function findPos(obj) {
		var curleft = curtop = 0;
		if (obj.offsetParent) {
			while (obj.offsetParent) {
				curleft += obj.offsetLeft;
				curtop += obj.offsetTop;
			obj = obj.offsetParent;
		}
		}
		return [curleft,curtop];
	}

	
window.onLoad=initMenu




body{scroll-bars: none}
#myTable { bottom:50px ; left:1%;width:98%%;background-color: #FFFFCC; position:absolute;text-align:center;height:18%;vertical-align:middle;left:25%; top:80%}
.imgIcon {width:50px;height:50px;}
.thumbImg {width:150px;height:150px;}
.mideuim {width:100px;height:100px;}
#mid{vertical-align:bottom;valign:middle}



Add row



















menu













</description>
		<content:encoded><![CDATA[<p>If you  pre-load images and load them dynamically before into your interface, only the first &#8216;window.onload&#8217; works if you refresh the page all your images disappear in IE  only FF works correctly. addd your own images to this script and modify the imgNames array<br />
	var imgNames = ["Refresh", "Telephone", "StaffPortal", "SRContractsdb", "StatApp", "MapApp", "AdminForms", "Calendar", "ARVTdb", "Exit" ];</p>
<p>var initMenu= function(){</p>
<p>  	var table=document.createElement(&#8216;table&#8217;)<br />
  		table.id=&#8221;myTable&#8221;<br />
  		table.align=&#8217;center&#8217;</p>
<p>  	var imgNames = ["Refresh", "Telephone", "StaffPortal", "SRContractsdb", "StatApp", "MapApp", "AdminForms", "Calendar", "ARVTdb", "Exit" ];<br />
	var imgObjects = [];</p>
<p>	var objBotMenu=document.getElementById(&#8216;botmenu&#8217;)<br />
    var tbody = document.createElement(&#8220;tbody&#8221;);<br />
    var row = document.createElement(&#8220;tr&#8221;)<br />
    var td = document.createElement(&#8220;td&#8221;)<br />
    		td.id=&#8217;mid&#8217;</p>
<p>    	  row.appendChild(td);<br />
      	tbody.appendChild(row);<br />
   	  	table.appendChild(tbody);<br />
//document.body.appendChild(table);</p>
<p>objBotMenu.appendChild(table);</p>
<p>for (var i = 0; i &lt; imgNames.length; i++){<br />
  imgObjects[i] = new Image();<br />
  imgObjects[i].src = &#039;imgs/&#039;+ imgNames[i] + &#039;.png&#039;;<br />
  imgObjects[i].onload = function(){<br />
  for (var i = 0; i &lt; imgNames.length; i++){<br />
    td.appendChild(imgObjects[i]);<br />
      imgObjects[i].className=&quot;imgIcon&quot;;<br />
      var imgleft=imgObjects[i].left<br />
                   imgObjects[i].onmouseover=function() {// function number 1<br />
                  var params = findPos(this);<br />
             var capsLayer= document.createElement(&quot;span&quot;)<br />
             capsLayer.style.position=&quot;absolute&quot;;<br />
             capsLayer.style.left= params[0]-310 ;<br />
    		 capsLayer.id=&#039;capsLayerId&#039;;<br />
     		capsLayer.innerHTML= &#039;&#039;+eval(imgNames[i])+&#039;&#039;;<br />
    	  td.appendChild(capsLayer);</p>
<p>             var capsLayer=<br />
             this.position=&quot;absolute&quot;;</p>
<p>              //this.parentNode.verticalAlign=&quot;top&quot;//**************position</p>
<p>             if(!this.nextSibling){<br />
             this.className=&quot;thumbImg&quot;;</p>
<p>             }else{</p>
<p>             this.nextSibling.className=&quot;mideuim&quot;//function code /#/1<br />
             }</p>
<p>             if(!this.previousSibling){<br />
             this.className=&quot;thumbImg&quot;</p>
<p>             }else{</p>
<p>			 this.previousSibling.className=&quot;mideuim&quot;</p>
<p>             }</p>
<p>             this.className=&quot;thumbImg&quot;	</p>
<p>             this.onmouseout=function() {<br />
             var capsLayer=document.getElementById(&#039;capsLayerId&#039;);<br />
if(capsLayer)<br />
capsLayer.parentNode.removeChild(capsLayer)<br />
             		 this.className=&quot;imgIcon&quot;;  </p>
<p>             			// this.parentNode.verticalAlign=&quot;top&quot;;//******************position</p>
<p> if(!this.nextSibling){this.className=&quot;imgIcon&quot;</p>
<p> }else{<br />
             this.nextSibling.className=&quot;imgIcon&quot;//function code /#/1</p>
<p>             }</p>
<p>             if(!this.previousSibling){<br />
             this.className=&quot;imgIcon&quot;</p>
<p>             }else{<br />
               //function code /#/2<br />
			 this.previousSibling.className=&quot;imgIcon&quot;</p>
<p>             }</p>
<p>             							};</p>
<p>             					};</p>
<p>    			}</p>
<p>			}<br />
	}<br />
	};<br />
function findPos(obj) {<br />
		var curleft = curtop = 0;<br />
		if (obj.offsetParent) {<br />
			while (obj.offsetParent) {<br />
				curleft += obj.offsetLeft;<br />
				curtop += obj.offsetTop;<br />
			obj = obj.offsetParent;<br />
		}<br />
		}<br />
		return [curleft,curtop];<br />
	}</p>
<p>window.onLoad=initMenu</p>
<p>body{scroll-bars: none}<br />
#myTable { bottom:50px ; left:1%;width:98%%;background-color: #FFFFCC; position:absolute;text-align:center;height:18%;vertical-align:middle;left:25%; top:80%}<br />
.imgIcon {width:50px;height:50px;}<br />
.thumbImg {width:150px;height:150px;}<br />
.mideuim {width:100px;height:100px;}<br />
#mid{vertical-align:bottom;valign:middle}</p>
<p>Add row</p>
<p>menu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jasmine</title>
		<link>http://www.impressivewebs.com/7-javascript-differences-between-firefox-ie/#comment-6758</link>
		<dc:creator>Jasmine</dc:creator>
		<pubDate>Thu, 02 Sep 2010 02:58:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.impressivewebs.com/?p=154#comment-6758</guid>
		<description>Nice list of Js differences... I am getting crazy trying to fix the getElementById problem... hope your tips there can help me. Thanks anyway.</description>
		<content:encoded><![CDATA[<p>Nice list of Js differences&#8230; I am getting crazy trying to fix the getElementById problem&#8230; hope your tips there can help me. Thanks anyway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rohit Patidar</title>
		<link>http://www.impressivewebs.com/7-javascript-differences-between-firefox-ie/#comment-6266</link>
		<dc:creator>Rohit Patidar</dc:creator>
		<pubDate>Thu, 29 Jul 2010 16:01:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.impressivewebs.com/?p=154#comment-6266</guid>
		<description>This doesn&#039;t work for Firefox :-    
1. var myCursorPosition = [0, 0];  
   2. myCursorPosition[0] = event.pageX;  
   3. myCursorPosition[1] = event.pageY;  

Please could you suggest me anything else.

Actually my problem is that i have to give ajax call when window closes. I used window.onbeforeunload .But problem is it is called when page is refreshed. So i want that only and only when my browser is closed then in window.onbeforeunload i should get position of browser close button and i will handle the call.</description>
		<content:encoded><![CDATA[<p>This doesn&#8217;t work for Firefox :-<br />
1. var myCursorPosition = [0, 0];<br />
   2. myCursorPosition[0] = event.pageX;<br />
   3. myCursorPosition[1] = event.pageY;  </p>
<p>Please could you suggest me anything else.</p>
<p>Actually my problem is that i have to give ajax call when window closes. I used window.onbeforeunload .But problem is it is called when page is refreshed. So i want that only and only when my browser is closed then in window.onbeforeunload i should get position of browser close button and i will handle the call.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Demiurg</title>
		<link>http://www.impressivewebs.com/7-javascript-differences-between-firefox-ie/#comment-2406</link>
		<dc:creator>Demiurg</dc:creator>
		<pubDate>Thu, 13 May 2010 07:09:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.impressivewebs.com/?p=154#comment-2406</guid>
		<description>In IE you can&#039;t use variable named &#039;item&#039; - it&#039;s reserved keyword.
In FF you can.
Be careful.</description>
		<content:encoded><![CDATA[<p>In IE you can&#8217;t use variable named &#8216;item&#8217; &#8211; it&#8217;s reserved keyword.<br />
In FF you can.<br />
Be careful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JAson</title>
		<link>http://www.impressivewebs.com/7-javascript-differences-between-firefox-ie/#comment-2085</link>
		<dc:creator>JAson</dc:creator>
		<pubDate>Sun, 02 May 2010 05:12:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.impressivewebs.com/?p=154#comment-2085</guid>
		<description>The way that css display is returned is different when reading classes (with jQuery even) - IE reads as [DISPLAY: none] while FF displays more like we all right our css - display:none; 

cost time and money, and cost others time and money, when you try to be different. (&lt;- ok, that was uncalled for - sorry to those who try to reinvent languages that exists and call themselves compatible.)  - I LOATHE debugging js</description>
		<content:encoded><![CDATA[<p>The way that css display is returned is different when reading classes (with jQuery even) &#8211; IE reads as [DISPLAY: none] while FF displays more like we all right our css &#8211; display:none; </p>
<p>cost time and money, and cost others time and money, when you try to be different. (&lt;- ok, that was uncalled for &#8211; sorry to those who try to reinvent languages that exists and call themselves compatible.)  &#8211; I LOATHE debugging js</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gaurab</title>
		<link>http://www.impressivewebs.com/7-javascript-differences-between-firefox-ie/#comment-2073</link>
		<dc:creator>gaurab</dc:creator>
		<pubDate>Thu, 29 Apr 2010 13:25:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.impressivewebs.com/?p=154#comment-2073</guid>
		<description>document.getElementById(&quot;supplier_no&quot;).value= values_array[0];

this piece of .js code works perfect in IE but not in firefox, get error as getElementById returns null.

what to do... plz. email me with some tips: gaurab_bas@yahoo.com</description>
		<content:encoded><![CDATA[<p>document.getElementById(&#8220;supplier_no&#8221;).value= values_array[0];</p>
<p>this piece of .js code works perfect in IE but not in firefox, get error as getElementById returns null.</p>
<p>what to do&#8230; plz. email me with some tips: <a href="mailto:gaurab_bas@yahoo.com">gaurab_bas@yahoo.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Louis Lazaris</title>
		<link>http://www.impressivewebs.com/7-javascript-differences-between-firefox-ie/#comment-1705</link>
		<dc:creator>Louis Lazaris</dc:creator>
		<pubDate>Tue, 30 Mar 2010 19:16:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.impressivewebs.com/?p=154#comment-1705</guid>
		<description>Galeel,

This is an older post. I wrote this when IE8 was still in Beta (or maybe earlier). I will put a notice at the top to indicate version. Thanks.</description>
		<content:encoded><![CDATA[<p>Galeel,</p>
<p>This is an older post. I wrote this when IE8 was still in Beta (or maybe earlier). I will put a notice at the top to indicate version. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Galeel</title>
		<link>http://www.impressivewebs.com/7-javascript-differences-between-firefox-ie/#comment-1702</link>
		<dc:creator>Galeel</dc:creator>
		<pubDate>Tue, 30 Mar 2010 14:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.impressivewebs.com/?p=154#comment-1702</guid>
		<description>for #4 and #5; when i run the demo link in IE8, i am getting displayed &quot;null&quot; then &quot;test&quot; as like FF. 
 
Please mention the IE version in your post</description>
		<content:encoded><![CDATA[<p>for #4 and #5; when i run the demo link in IE8, i am getting displayed &#8220;null&#8221; then &#8220;test&#8221; as like FF. </p>
<p>Please mention the IE version in your post</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan</title>
		<link>http://www.impressivewebs.com/7-javascript-differences-between-firefox-ie/#comment-1261</link>
		<dc:creator>Nathan</dc:creator>
		<pubDate>Wed, 10 Feb 2010 23:07:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.impressivewebs.com/?p=154#comment-1261</guid>
		<description>Thank you g, I totally agree that tools like JQuery are useful, but they can never be as powerful as building JS from the ground up. I prefer to have my own library of scripts for firefox/ie compatibility (and I add to it all the time). I feel as though tools like JQuery dull a programmer&#039;s ability to think with logical creativity when confronted with a problem that the framework cannot handle.</description>
		<content:encoded><![CDATA[<p>Thank you g, I totally agree that tools like JQuery are useful, but they can never be as powerful as building JS from the ground up. I prefer to have my own library of scripts for firefox/ie compatibility (and I add to it all the time). I feel as though tools like JQuery dull a programmer&#8217;s ability to think with logical creativity when confronted with a problem that the framework cannot handle.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: g</title>
		<link>http://www.impressivewebs.com/7-javascript-differences-between-firefox-ie/#comment-1112</link>
		<dc:creator>g</dc:creator>
		<pubDate>Wed, 27 Jan 2010 23:02:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.impressivewebs.com/?p=154#comment-1112</guid>
		<description>thanks for the article.... not everyone cares to use frameworks (as more power can be achieved in direct js most of the time), but it helps to remember these key points ;)</description>
		<content:encoded><![CDATA[<p>thanks for the article&#8230;. not everyone cares to use frameworks (as more power can be achieved in direct js most of the time), but it helps to remember these key points ;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
