Please point me in the right direction if I am in the wrong forum, but I do not know where to go to find help with this?
I am using the following code to make an ajax call from one page to another page. In the request.fail callback, I get "Request Failed: parsererror". Can someone help or tell me how I can debug this error? I am using classic asp website.
One thing I am not sure about is how to return the information back to the calling page. If I put the other page's code into my calling page, I see that it runs and produces a string of information. How do I ensure that information created is returned to the calling page?
This is some information I've gathered from Chrome's developer tools.
eventId: "-1"
finishTime: "8:45 PM"
locationId: "74480"
opponentId: "0"
request: Object
startTime: "7:45 PM"
teamId: "0"
this: Window
url: "/GameAjax/GetDates.asp?ied=-1&tid=0&oid=0&lid=74480&st=7:45 PM&fn=8:45 PM"
- var url = 'GetDates.asp?ied=' + eventId + '&tid=' + teamId + '&oid=' + opponentId + '&lid=' + locationId
- + '&st=' + startTime + '&fn=' + finishTime;
- $.ajaxSetup ({
- cache: false
- });
- var request = $.ajax({
- url: url,
- dataType: "text/html",
- type: "POST",
- });
- request.done(function(msg) {
- alert(msg);
- });
- request.fail(function(jqXHR, textStatus) {
- alert( "Request failed: " + textStatus );
- });