Hi,

i have an ajax writen web application that calls a page silently and retrieves some Data information.

for the other pages called with this Jscript request object i have no problem,

with one i get request.status=404 all the time and for no logic reason. the Jscript doesn't even opens the aspx silent page.

i tried everything from puting all the code in one folder to changing the name an rewriting the code but still no change and only for this one page.

i think i'm going slitly mad because of that, here is the jscript code:





1 function populateCountryTeams(popFromCountry,popToId)
2 {
3 populateObjectTo=document.getElementById(popToId);
4 populateObjectTo.options.length = 1;
5 populateObjectTo.selectedIndex=0;
6
7 if(popFromCountry.options[popFromCountry.selectedIndex].value != '')
8 //Check if the selectedItem is not "--Select--"
9 {
10 return SendCountryTeamsRequest(popFromCountry.options[popFromCountry.selectedIndex].value);
11 }
12 else
13 {
14 clearSelect(populateObjectTo);//Clear the Territory dropdown
15 //status.innerText = "";//Blank the status text label
16 }
17 }
18
19 function SendCountryTeamsRequest(ID)
20 {
21
22 status.innerText = "Loading.....";//Set the status to "Loading....."
23 InitializeRequest();//Call InitializeRequest to set request object
24
25 var url = "../AjaxPages/CountryTeamsAjaxServer.aspx?countryname="+ID;//Create the url to send the request to
26 //alert(url);
27 request.onreadystatechange = ProcessRequestCountryTeams;//Delegate ProcessRequest to onreadystatechange property so it gets called for every change in readyState value
28 request.open("GET", url, true);//Open a GET request to the URL
29 request.send(null);//Send the request with a null body.
30
31 //alert('aft'+Territory);//alert(ID);
32 }
33
34 function ProcessRequestCountryTeams()
35 {
36 if(request.readyState == 4)//If the readyState is in the "Ready" state
37 {
38 if(request.status == 200)//If the returned status code was 200. Everything was OK.
39 {
40 if(request.responseText != "")//If responseText is not blank
41 {
42 //alert('procc ' + request.responseText);
43 //////old populateListTeams(request.responseText);//Call the populateList fucntion
44 populateListTeams(request);
45 //status.innerText = "Territories Loaded";//Set the status to "Territories Loaded"
46 }
47 else
48 {
49 //status.innerText = "None Found";//Set the status to "None Found"
50 clearSelect(populateObjectTo);//Call clearSelect function
51 }
52 }
53 }
54 return true;//return
55 }
56
57 function populateListTeams(response)
58 {
59
60 var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");//Create the XMLDOM object
61 xmlDoc.async = false;
62 xmlDoc.loadXML(response);//Load the responseText into the XMLDOM document
63
64 var opt;
65
66
67 var TerritoriesElem = xmlDoc.getElementsByTagName("Teams");//Create the EmployeeTerritories element
68 //alert('tert'+TerritoriesElem);
69 var TerritoryElem;
70 if(TerritoriesElem.length > 0)
71 TerritoryElem = TerritoriesElem[0].getElementsByTagName("Team");//Create the TERRITORIES element
72
73 clearSelect(populateObjectTo);//Clear the dropdown before filling it with new values
74
75 if(TerritoriesElem.length > 0)//If there are one or more TERRITORIES nodes
76 {
77
78 for (var i = 0; i < TerritoryElem.length; i++)//Loop through the XML TERRITORIES nodes
79 {
80 var textNode = document.createTextNode(TerritoryElem[i].getAttribute("teamtitle"));//Create a TextNode
81 appendToSelect(populateObjectTo, TerritoryElem[i].getAttribute("teamid"), textNode);//Call appendToSelect to append the text elements to the Territory dropdown
82 }
83
84 }
85
86 }