Jump to content

Ajax & Firefox Issue


ProXy_

Recommended Posts

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.