And obviously in keeping with eqtiquette don't cross post - you will need to
close / answer your own question on cd-howto now.







"This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant,
Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions." 
Visit our website at http://www.reedexpo.com

-----Original Message-----
From: Phillip M. Vector
To: CF-Talk
Sent: Mon Jul 16 03:24:18 2007
Subject: Prototype/AJAX Neubie question

Can someone tell me how I can have 2 separate ajax threads?

Whenever I run the code below, it works as long as only 1 is triggered
at a time.

How do I make essentially 2 separate AJAX calls and keep the data coming
back separate?



=====================================================================
<script>
                function showmessages()
                {
                        xmlHttp=GetXmlHttpObject()
                        var url="CheckMessages.cfm";
        
url=url+"&room="+document.getElementById("Room").value;
                        xmlHttp.onreadystatechange=stateChanged;
                        xmlHttp.open("GET",url,true);
                        xmlHttp.send(null);
                }

                function stateChanged()
                {
                        if (xmlHttp.readyState==4)
                        {
        
document.getElementById("Messages").innerHTML=xmlHttp.responseText;
                        }
                }
</script>


<script>
                function checkusers()
                {
                        xmlHttp=GetXmlHttpObject()
                        var url="CheckUsers.cfm";
                        xmlHttp.onreadystatechange=UsersChanged;
                        xmlHttp.open("GET",url,true);
                        xmlHttp.send(null);
                }

        function UsersChanged()
        {
                if (xmlHttp.readyState==4)
                {
        
document.getElementById("Users").innerHTML=xmlHttp.responseText;
                }
        }
</script>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283738
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to