I'm using an ajax function to call multiple php files to the same HTML web page. Dividends must be dynamic the data is stock prices. It seems that the last stock price is only updating the other 9 are not is their a limitation to the number of ajax functions used in a single web page. Here is the code I'm using 10 times is separate div's

<div id="squotes_div7"><script type="text/javascript">

    function ajaxFunction() {
        var xmlHttp;

        try {
            // Firefox, Opera 8.0+, Safari
            xmlHttp = new XMLHttpRequest();
        } catch (e) {
            // Internet Explorer  try
            try {
                xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {
                    alert("Your browser does not support AJAX!");

                    return false;
                }
            }
        }

        xmlHttp.onreadystatechange = function() {
            // only if req is "loaded"
            if (xmlHttp.readyState == 4) {
                // only if "OK"
                if (xmlHttp.status == 200 || xmlHttp.status == 304) {
                    results = xmlHttp.responseText;
                    document.getElementById("squotes_div7").innerHTML = results;
                } else {
innerHTML="ajax error:\n" + xmlHttp.statusText;
                }
            }
        }

        xmlHttp.open("GET", "/quotes/eurusdpr.php", true);
        xmlHttp.send(null);

    }

    ajaxFunction();
</script></div>
Member Avatar for fatihpiristine

try using "var q = new ajaxFunction();" when you are calling ur ajax function. this will probably help you

i tried to add var but no use. Any help please

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.