Dear All,
Please excuse the following thickness, I am new to client scripting.
I have set up a page comprising of three DIVs, the content of which
gets changed by XMLHTTP requests (including the following code in a
function).
if ((xmlhttp.ready State == 4) && (xmlhttp.status == 200)) {
document.getEle mentById(loc).i nnerHTML = xmlhttp.respons eText;
}
My problem is when the page first loads. I had assumed that I could
just use onLoad to run a function that gets the data, but it gets
confused by the fact that it receives three queries in rapid
succession, before the server has had time to reply. How could I go
about queuing the requests so that they wait for one to load before the
next on triggers?
Everything works so well if I manually set up the pages - this is one
of the last hurdles I need to get through to have a promising looking
prototype. I am so impressed with how much more can be done with
JavaScript that when I last used it (a few years ago now) - no more
pages that strobe a rainbow of colours when you visit them!
I'd gratefully appreciate any advice that you (my obvious intellectual
superiors!) could provide on the issue.
Thank you kind Sirs (and Ladies),
Dan
(email not working - group reply appreciated) 1 1330 da*******@hotma il.com said on 03/04/2006 4:34 AM AEST: Dear All,
Please excuse the following thickness, I am new to client scripting.
I have set up a page comprising of three DIVs, the content of which gets changed by XMLHTTP requests (including the following code in a function).
if ((xmlhttp.ready State == 4) && (xmlhttp.status == 200)) { document.getEle mentById(loc).i nnerHTML = xmlhttp.respons eText; }
My problem is when the page first loads. I had assumed that I could just use onLoad to run a function that gets the data, but it gets confused by the fact that it receives three queries in rapid succession, before the server has had time to reply. How could I go about queuing the requests so that they wait for one to load before the next on triggers?
Firstly, what is 'it' referring to in '...it gets confused'? You need
to provide some error messages. A bit more code and snippet of HTML
might help too - just enough to show the error, not your entire application.
Secondly, are you creating the xmlhttp object as a global variable
(which seems pretty common). If so, you may be over-writing it with
subsequent calls.
You can queue the requests simply by having synchronous requests where
each request calls the next one - but that defeats the purpose of
HttpRequest to a large extent.
Consider using this stuff:
<URL:http://www.ajaxtoolbox .com/>
Look in the examples, there is one for a number of simultaneous
asynchronous requests.
--
Rob This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ohaya |
last post by:
Hi,
I'm trying to understand a situation where ASP seems to be "blocking" of
"queuing" requests. This is on a Win2K Advanced Server, with IIS5.
I've seen some posts (e.g.,
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=Tidy7IDbDHA.2108%40cpmsftngxa06.phx.gbl)
that indicate that ASP will queue up requests when they come in with the
same "session".
|
by: fochie |
last post by:
Greetings,
I'm having a problem when I try to GET a file from my server
via xmlhttp when using Mozilla. With IE I can get any type of file
fine, get/display headers fine, etc. With Mozilla, using the same
HTML/JS it always returns no data (xmlhttp.responseText is null).
When I try to get headers using Mozilla or display the http status code
I get some obscure exception in the javascript console that I've given
up on searching for an...
|
by: jim.frantzen |
last post by:
You have an active XMLHTTP request on the main page
(localhost/App1/index.aspx) The XMLHTTP request takes about 60 seconds
to receive a response back from localhost/App1/getxml.aspx.
You have an IFRAME on this main page.
When you set the iframe's src to google.com, it works fine.
When you set the iframe's src to localhost/App1/test.htm, it works
fine.
When you set the iframe's src to
|
by: Just D. |
last post by:
Did anybody use this Message Queuing and knew all details about it? What's
the physical limit of this Message Queuing system, number of messages,
mbytes, message size? Where it stores messages, RAM, DISK? Do we lose
everything if the machine is just rebooted or we can save all messages on
disk to send them later where we're on line?
Just D.
|
by: tiger |
last post by:
Hi,
I have a question on MS Message queuing.
I would like to check a message queuing to see if there is a message in the
queue. That is if the queue is empty, I would like to send a note to a
textbox.
Thanks
Tiger
| |
by: Dave Pink |
last post by:
I support a web server farm of about 80 machines, of which 35 are in
Production at any given time. Machines are running Windows 2000
Advanced Server with IIS 5. All 80 machines are configured exactly the
same in regards to software, yet only one machine repeatedly shows
queuing on the performance counter ASP.NET Requests Queued. No other
machines show any queuing at all.
The queuing occurs on the machine in question only after it is put...
|
by: balakrishnan.dinesh |
last post by:
hi friends,
Exactly what i want to know is, In my product we are using
xmlhttp request to retrive some data from the server, And Im using IE
browser, its working fine in IE.
Now i want to work with netscape,I dont know how to pass the xmlhttp
request in Netscape. i got some code like below for netscape for
xmlhttp
var oXML=new XMLHttpRequest();
|
by: yawnmoth |
last post by:
<http://www.quirksmode.org/book/printable/xmlhttp.txtshows two
alternatives to Microsoft.XMLHTTP - Msxml2.XMLHTTP and Msxml3.XMLHTTP.
If my understanding is correct, the different numbers refer to the
version of Microsoft's XML parser and that Microsoft.XMLHTTP refers to
the latest installed version.
This makes me wonder why sites like
<http://developer.apple.com/internet/webcontent/xmlhttpreq.htmlopt to
use Msxml2.XMLHTTP, first, and...
|
by: Andrewh |
last post by:
Hi,
I am having a bit of a problem with using xmlhttp. The code of the javascript file is shown below used in Windows XP.
var xmlhttp = null;
function SetURLDiv(url) {
if (window.XMLHttpRequest) {
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |