Click here to Skip to main content
15,887,416 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
$.ajax({
type : "GET",

cache : false,
url : '/RideRun365/kit?sport='
+ b + '&gender=' + 'Men' + '&temp=' + a,
success : function(data) {
$("#notify")
.html(
"Thanks! We will notify you as soon as more inventory has arrived.");
},
error : function() {
alert("hii");
}
});
Posted
Comments
deepankarbhatnagar 7-Jan-16 1:36am    
please explain more you query..
Richard MacCutchan 7-Jan-16 6:54am    
Check that the url variable's text contains a valid URL.
Sinisa Hajnal 8-Jan-16 6:21am    
instead of alerting hii from the error, get the error object and read the message. Probably wrong URL or access rights...

Why do you have gender=Men in separate concatenation when it is all string and not variable?

1 solution

You need to change the signature of your error function to capture passed in parameters. For example you could do something like this:
JavaScript
error: function (XMLHttpRequest, textStatus, errorThrown) {
         alert(XMLHttpRequest.statusText);
     }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900