Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why i can't access the object property with AJAX ?

Status
Not open for further replies.

liuk

Programmer
Jan 16, 2006
54
IT
Hi,
i'm a beginner with ajax and i have a problem :
i can't get the object properties within the javascript function.

This is the test code i wrote:


function FillCombo(ddl)
{
Repository.GetDataList(11,FillCombo_callback);
}

function FillCombo__callback(response)
{
if ( response != null && response.value != null)
{
alert(response.value[0].Name);
}

}


The GetDataList method return an arraylist of my custom object.

The result is "undefined" but the data are correctly loaded by the GetDataList method. When i debug the code the response.value[0] is a string like "mynamespace.myClassName" but not an object !

What's going wrong?


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top