Hello,
Is possible to determine the timeout of XMLHTTP Request?
My solicitations using the XMLHTTP they are giving error and
this because the page it is delaying a little more to send the result
to the XMLHTTP...
Thanks, 8 18685
Marcos wrote: Is possible to determine the timeout of XMLHTTP Request?
The client-side object (e.g. Msxml2.XMLHTTP) does not have a method to
set timeouts but the server side object (e.g. Msxml2.ServerXMLHTTP)
which can be used in ASP pages has a method:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/7e91f3de-d21c-404d-966a-95c148b22e98.asp>
--
Martin Honnen http://JavaScript.FAQTs.com/
My pages is in PHP :(
Thanks.
Em Wed, 29 Jun 2005 13:14:29 -0000, Martin Honnen <ma*******@yahoo.de>
escreveu: Marcos wrote:
Is possible to determine the timeout of XMLHTTP Request?
The client-side object (e.g. Msxml2.XMLHTTP) does not have a method to set timeouts but the server side object (e.g. Msxml2.ServerXMLHTTP) which can be used in ASP pages has a method: <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/7e91f3de-d21c-404d-966a-95c148b22e98.asp>
Marcos wrote: Is possible to determine the timeout of XMLHTTP Request? My solicitations using the XMLHTTP they are giving error and this because the page it is delaying a little more to send the result to the XMLHTTP...
A browser's timeout using XMLHttpRequest should be the same as its normal
timeout period for any other request.
How long is your server taking to deliver the result?
--
Matt Kruse http://www.JavascriptToolbox.com http://www.AjaxToolbox.com
Around of Six seconds, in local test.
If help, the code is:
function getcategories(xmlhttp)
{
if(xmlhttp)
{
xmlhttp.open("GET", "MYPAGE",true);
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
{
if(xmlhttp.status==200)
{window.opener.document.getElementById('c_categori es').value =
xmlhttp.responseText;}
if(xmlhttp.status==404) alert("Page not Found");
}
}
xmlhttp.send(null);
alert("Your Choise was stored");
self.close(); // Close the window
}
I already change the
window.opener.document.getElementById('c_categorie s').value =
xmlhttp.responseText; to alert(xmlhttp.responseText) for test and the
problem continues.
Thanks.
Marcos wrote: Around of Six seconds, in local test.
It times out in 6 seconds? Then it's surely not the browser timing out the
request. Something else is going on.
If help, the code is:
Could you post an example URL? The code is fine, but since there's probably
something else going on, we'd need to see the whole page to know for sure.
--
Matt Kruse http://www.JavascriptToolbox.com http://www.AjaxToolbox.com
Could you post an example URL?
Yes. I Can.
xmlhttp.open("GET",
"apps.php?call=navcategory&maxlimit="+maxlimit+"&s elected_cat="+selected+ "&xmlactive=true&finish=true",true);
I have more informations, the firefox detected one error:
Error: [Exception... "Component returned failure code: 0x80040111
(NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult:
"0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://200.138.105.166:45751/apps/js/category.js :: anonymous :: line
133" data: no]
Source File: http://200.138.105.166:45751/apps/js/category.js
Line: 133
Line 133:
if(xmlhttp.status==200)
{window.opener.document.etElementById('c_categorie s').value =
xmlhttp.responseText;}
If I get the address apps.php(etc..) and past in the browser the result is
returned correctly...
Any Idea?
--
Thanks,
Marcos José Setim
________________________________________
Usando o M2 do Opera: http://www.opera.com/m2/
Marcos wrote:
<snip> xmlhttp.send(null); alert("Your Choise was stored"); self.close(); // Close the window
<snip>
It is difficult to see closing the window from which you are making an
xml http request just after sending the request as a good idea.
Richard.
Marcos wrote: Could you post an example URL?
Yes. I Can.
xmlhttp.open("GET", "apps.php?call=navcategory&maxlimit="+maxlimit+"&s elected_cat="+selected+ "&xmlactive=true&finish=true",true);
1. <http://en.wikipedia.org/wiki/URL>
2.
xmlhttp.open(
"GET",
[
"apps.php?call=navcategory&maxlimit=", maxlimit,
"&selected_cat=", encodeURIComponent(selected),
"&xmlactive=true&finish=true"
].join(""),
true);
I have more informations, the firefox detected one error:
(more _information_)
Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://200.138.105.166:45751/apps/js/category.js :: anonymous :: line 133" data: no] Source File: http://200.138.105.166:45751/apps/js/category.js Line: 133
Line 133:
if(xmlhttp.status==200)
From the exception above, it appears that there is no `status' property
available here. Could be a cross-domain issue as you access the machine
with the IP address 200.138.195.166 instead of the current domain or
one of its subdomains.
{window.opener.document.etElementById('c_categorie s').value =
^^[1]
If `c_categories' is the ID of a form control, you should use
window.opener.document.forms[...].elements['c_categories'].value = ...;
If you access this object repeatedly, you should assign a reference
to a variable and use the variable instead to save lookups.
[1] Typo?
PointedEars This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: |
last post by:
Hi, i'm trying to run an .asp page to get an xml file off a server.
I need to know what object to create. My page just runs till timeout...it
bombs on the httpxml.send command. This is the code I...
|
by: Steven Burn |
last post by:
The application;
Service on my webserver that allows a user to upload their HOSTS file for functions to verify the contents are still valid.
Uses;
1. XMLHTTP (MSXML2)
2. FileSystemObject...
|
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,...
|
by: Vanessa |
last post by:
I have a question regarding async mode for calling Microsoft.XMLHTTP object.
Microsoft.XMLHTTP hangs the IE once in a while suddenly, but it will work
again after half an hour or so without doing...
|
by: hugo.lafayette |
last post by:
I use an HttpRequest in my web application to launch an heavy
computation server side. The result is then send back to the browser.
The problem I got is that when the computation took too much...
|
by: Ike |
last post by:
Ive copied an online example for writing out a php file, programmatically,
then would like to re-display that data in a browswer window that
automatically refreshes as the data file (getdata.php,...
|
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...
|
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...
|
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...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |