IE onload again and again
<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
<P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"><FONT face=Arial color=#000000 size=3>Hi,<BR><BR>I’ve been getting weird behaviour in IE6 and it is related to a previous post.<BR><BR>i am using this fix for the problem outlined:<BR><BR></FONT><A href="http://dean.edwards.name/weblog/2006/06/again/"><U><FONT face=Arial color=#800080 size=3>http://dean.edwards.name/weblog/2006/06/again/</FONT></U></A></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><FONT face=Arial color=#000000 size=3>I have the following tag with the defer attribute:<BR><BR></FONT><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">script</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000> </FONT><SPAN style="COLOR: red">defer</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: red">src</SPAN><SPAN style="COLOR: blue">="/js/ie_onload.js"></</SPAN><SPAN style="COLOR: #a31515">script</SPAN><SPAN style="COLOR: blue">><BR><BR></SPAN></SPAN><FONT face=Arial color=#000000 size=3>The script simply .js file simply calls a function called init for ie6<BR><BR>In my init method I am calling the JQuery AJAX function like this:<BR><BR></FONT><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000>$.ajax({type: </FONT><SPAN style="COLOR: #a31515">"POST"</SPAN><FONT color=#000000>, url: url, data: postData, success: successCallBack,<SPAN style="mso-spacerun: yes"> </SPAN><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes"> </SPAN>complete: </FONT><SPAN style="COLOR: blue">function</SPAN><FONT color=#000000>(){<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes"> </SPAN>stopWorking();<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes"> </SPAN>$(</FONT><SPAN style="COLOR: #a31515">'#working'</SPAN><FONT color=#000000>).hide();<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes"> </SPAN>}, <o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes"> </SPAN>beforeSend: </FONT><SPAN style="COLOR: blue">function</SPAN><FONT color=#000000>(xhr){<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes"> </SPAN>xhr.setRequestHeader(</FONT><SPAN style="COLOR: #a31515">"UseAjaxError"</SPAN><FONT color=#000000>, </FONT><SPAN style="COLOR: #a31515">"true"</SPAN><FONT color=#000000>);<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>},<SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes"> </SPAN>timeout: _ajaxTimeOut, <o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes"> </SPAN>error: errorFunction<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes"> </SPAN>});<BR><BR></FONT></SPAN><FONT face=Arial color=#000000 size=3>I am setting the html of a div with the result of the callback like this:<BR><BR>$(‘#content’).html(result);</FONT><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><BR><BR></SPAN><FONT face=Arial color=#000000 size=3>Now here is where the weirdness starts.<SPAN style="mso-spacerun: yes"> </SPAN>I have a collection of span tags that I using to set display images, for example:<BR><BR></FONT><SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #a31515; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">span</SPAN><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000> </FONT><SPAN style="COLOR: red">id</SPAN><SPAN style="COLOR: blue">="siteEdit"</SPAN><SPAN style="COLOR: red"> class</SPAN><SPAN style="COLOR: blue">='iconEdit'</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: red">title</SPAN><SPAN style="COLOR: blue">='Edit this site'></SPAN><SPAN style="COLOR: red"> </SPAN><SPAN style="COLOR: blue"></</SPAN><SPAN style="COLOR: #a31515">span</SPAN><SPAN style="COLOR: blue">><BR><BR></SPAN></SPAN><FONT size=3><FONT color=#000000><FONT face=Arial>I also have some image tags that are being set programmatically in the server side code.<BR><BR>The problem being that the images are almost loading sequentially.<SPAN style="mso-spacerun: yes"> </SPAN>Like they are being loaded one after the other.<SPAN style="mso-spacerun: yes"> </SPAN>It takes them a long time to appear on the page.<SPAN style="mso-spacerun: yes"> </SPAN>It is not happening in any other browser.<BR><BR>I am totally lost as to what is getting on.<SPAN style="mso-spacerun: yes"> </SPAN>Is it anything to do with when defer attribute invoking the init function before the <BR><BR>If I returned the html as JSON would this solve the problem?<BR><BR>I really am stuck on this one.<BR><BR>Any ideas considered </FONT><SPAN style="FONT-FAMILY: Wingdings; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">J</SPAN></SPAN></FONT></FONT><BR><BR><SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><BR></SPAN><BR><BR style="mso-special-character: line-break"><BR style="mso-special-character: line-break"></P><BR><BR>dagda1@hotmail.com<br /><hr />Get 5GB of online storage for free! <a href='http://clk.atdmt.com/UKM/go/msnnkmgl0010000005ukm/direct/01/' target='_new'>Get it Now! </a>