'Microsoft JScript runtime error: Object expected'

Hi,

I am trying to create a SharePoint hosted App and trying to access list items from a site collection, but getting below error:

Message: Object expected
Line: 43
Char: 5
Code: 0
URI: http://app-f031adafdcc03e.apps.com/sites/AppDevelopment/AppCustomers/Scripts/AppCustomers.js

Below is the code I am using :

And below is the error which I am facing.

Please suggest solution.

September 4th, 2015 8:45am

Hi Sandeep,

There is syntax error in your code. it shouldn't be $,ajax (there shouldn't be a comma) It should be  $.ajax({ (there should be a dot)

If its not helping you please let us know

Free Windows Admin Tool Kit Click here and download it now
September 4th, 2015 8:53am

Hi ,

thanks, it was syntax mistake.

But now I am getting below error.

Please suggest !!

September 4th, 2015 9:00am

Hi,

 I am suspecting your REST api url is not proper. So I would suggest that cross check with your REST api url. 

If its not helping please let us know

Free Windows Admin Tool Kit Click here and download it now
September 4th, 2015 9:05am

Hi sandeep,

You can check your url in advance rest api tool or in simply in browser and check it out whether it is returning data from list....

then place working url in your script....

if you see a reply being an answer to the question of the thread, click Mark As Answer

September 5th, 2015 2:45am

Hi,

Thanks for the reply.

I guess issue was due to cross-site scripting (for IE only).So now I am using Mozilla Filrefox which resolved the 'No Transport' error by adding below line in script

   jQuery.support.cors = true;

But now I getting below error, with no specific error message ,so now I am stuck

Please help ,if u are aware of this issue.

Free Windows Admin Tool Kit Click here and download it now
September 5th, 2015 1:33pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics