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
Post a Comment