jquery - During the ajax call url get distrubs -


i have following url

 var url ="cruuntest/contactgrabber/getdata?code=4/8kxuru8wyruzruypeexo9wom0boi.yvd5wc6y5riwenp6uapfm0h6lj2rjqi" 

and doing

$.ajax({             type: "post",             url: url,             success: function (obj) {                 $contactimporter.createcontactgridmodel(obj);              },             error: function (xhr, ajaxoptions, thrownerror) {                 alert('error = ' + xhr.responsetext);             }         }); 

but redirects

http://localhost:80/cruuntest/contactgrabber/index/cruuntest/contactgrabber/getdata?code=4/8kxuru8wyruzruypeexo9wom0boi.yvd5wc6y5riwenp6uapfm0h6lj2rjqi 

i not know why? have hosted application on iis 8. when running code wihout hosting in iis works fine.

you running ajax call page:

/cruuntest/contactgrabber/index

and appends query url:

/cruuntest/contactgrabber/index (appended here, seeing)

you need start '/' start of url, this:

/cruuntest/contactgrabber/getdata?code=4/8kxur

that / tells start @ root not current page is.

that solve problem think.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -