Upgraded to .NET 3.5 ... AJAX totally *****ed. At wits end

  • Thread starter Thread starter Jethro
  • Start date Start date
J

Jethro

Right, had to manually upgrade a website to .NET 3.5, from .NET 2.0

made changes to web config to use newer versions of AJAX. Struggled
through loads of articles hinting that the upgrade was not a good
idea :-( In the end I had to create a directory structure in my app to
hold the .js files ..
so its includes\system.web.extensions\3.5.0.0\3.3.5.30729.196 (I also
had to add a 3.5.30729.1 directory, as for some reason my Server2003
machine has a different idea of what DLLs it's using, even though both
it, and my development machine are allegedly .NET 3.5SP1).

So now, it seems AJAX is working ... until I try an use functions
which call webservices ... at which point I am flummoxed. I have
debugged through, and the javascript is running. However, for some
reason, the following code is failing

ClearDropDown(getObj.lstFTOccupations);
for (var i=0; i< arg.length;i++){
var mylist = arg.split(':');
addOccupations(getObj.lstFTOccupations,mylist[1],mylist[0]);
}

because there appears to be no value for "arg.length". Instead, in the
debugger I see this sub-object called "d", which contains all the
items. But no .length property ...

can ANYONE explain wtf is going on, please ...

thanks in advance
 
However, for some
reason, the following code is failing

ClearDropDown(getObj.lstFTOccupations);
for (var i=0; i< arg.length;i++){
var mylist = arg.split(':');
addOccupations(getObj.lstFTOccupations,mylist[1],mylist[0]);
}

because there appears to be no value for "arg.length". Instead, in the
debugger I see this sub-object called "d", which contains all the
items.


So the problem seems in how arg is build... Where does it come from ? From a
web service using LINQ ?
 
for security reasons the json returned from a .net json is wrapped in a
{d:{responseObject...}}. you don't show you webservice call or
deserialization step, so its hard to know what you are doing.

if you used the javascript wrapper generated by the .net webservice, it
does this for you.

-- bruce (sqlwork.com)
 
Back
Top