What I'm trying to do is let the page make ajax request every second
to get the latest status from ajax.php however I got a "too much
recursion" error in the javascript. Any ideas? Thanks a lot!

<script type="text/javascript">
function displayMSAStatus()
{


        var url="Ajax.ashx";
        var params="do=MSAStatus";
        var myAjax = new Ajax.Request
        ( url,

            {
                method: 'get',  parameters: params ,
                        onComplete: function(response)
                        {
                            var el = document.getElementById('MSAStatusDiv');

                            var re = /^Error/;

                            if (!response.responseText.match(re))
                            {
                                        el.innerHTML = response.responseText;

                                }

                }
        }
        );

        setTimeout(displayMSAStatus, 1000);
}


setTimeout(displayMSAStatus, 1000);

</script>
<div id=MSAStatusDiv>
</div>
        setTimeout(displayStatus(vthis), 1000);
}

displayStatus(document.getElementById('statusDiv'));

</script>
<div id=statusDiv>
</div>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to