ProXy_ Posted October 3, 2009 Share Posted October 3, 2009 Hello, Hopefully someone can help me out with this. I've never had this issue before with firefox. the code is far to big to copy in here so i will paste the parts we're focusing on. function displayMessage() { var xhr_object = null; if(window.XMLHttpRequest) // Firefox xhr_object = new XMLHttpRequest(); else if(window.ActiveXObject) // Internet Explorer xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); else { // XMLHttpRequest non support par le navigateur alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...utilisez firefox cela ne vous ferra pas de mal"); return; } xhr_object.open("GET", "editpanel.php<?php echo $z; ?>", true); xhr_object.onreadystatechange = function() { if(xhr_object.readyState == 4) { var chaine=xhr_object.responseText; normal.innerHTML=chaine; setTimeout( "displayMessage()",160000); } } xhr_object.send(null); } Now, this code working by itselfs works great. However when i go to include this code into my template. Internet explorer displays the content just fine, however firefox not only doesn't show the content, but seems to trick out the template as well. Here is a piece of the template. Don't mind the missing html I'm only pasting snipplets. <body id="framePage" onload="resizeIframe('editpanel')"> <div id="art-main"> <div class="art-Sheet"> <div class="art-Sheet-cc"></div> <div class="art-Sheet-body"> <div class="art-Header"> <div class="art-Header-jpeg"></div> </div> <div class="art-nav"> <div class="l"></div> <div class="r"></div> <ul class="art-menu"> <li><a href="#"><span class="l"></span><span class="r"></span><span class="t">Home</span></a></li> <li><a href="../docs/about.php"><span class="l"></span><span class="r"></span><span class="t">About</span></a> </li> <li><a href="members.php" class=" active"><span class="l"></span><span class="r"></span><span class="t">My Page</span></a></li> <li><a href="login.php?id=logout"><span class="l"></span><span class="r"></span><span class="t">Logout</span></a></li> </ul> </div> <div class="art-contentLayout"> <div class="art-content"> <div class="art-Block"> <div class="art-Block-tl"></div> <div class="art-Block-tr"></div> <div class="art-Block-bl"></div> <div class="art-Block-br"></div> <div class="art-Block-tc"></div> <div class="art-Block-bc"></div> <div class="art-Block-cl"></div> <div class="art-Block-cr"></div> <div class="art-Block-cc"></div> <div class="art-Block-body"> <div class="art-BlockHeader"> <div class="art-header-tag-icon"> <div class="t">Your domains!</div> </div> </div><div class="art-BlockContent"> <div class="art-BlockContent-body"> <div> <span class="art-button-wrapper"> <span class="l"> </span> <span class="r"> </span> </span> // This is where it displays the XmlHTTPRequest <div id="normal"> <script> displayMessage(); </script> </div> </div> </div> </div> </div> </div> So, with that being said. the Xml function i explained earlier is at the top of the page, in the head section as always. and i just don't understand why firefox is rejecting the ajax httprequest... If anyone has any ideas i would greatly appreciate it. Quote Link to comment Share on other sites More sharing options...
paulman888888 Posted October 3, 2009 Share Posted October 3, 2009 This doesn't answer your question fully but what you could do (and its what i do) is run your code the W3C validator. It will pick up on errors that should solve your issue. I had a simple issue but with IE6 and i fixed it thanks to the validator! hope i helped Paul Quote Link to comment Share on other sites More sharing options...
ProXy_ Posted October 3, 2009 Author Share Posted October 3, 2009 ah, thank you i will give it a try. I had no idea W3C had a validator Thank You. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.