问题描述:

I get a parser error thrown from this ajax call...

var pageURL = document.location.href;

var hotlinkName = $('#hotlinkName').val();

if (hotlinkName.length > 0) {

$.ajax({

data: {

hotlinkName: hotlinkName,

hotlinkURL: pageURL

},

success: function() {

alert('Your hotlink ' + hotlinkName + ' has been inserted to the url: ' + pageURL);

},

error: function (ajaxOptions, thrownError) {

alert(thrownError);

alert('Var hotlinkName: ' + hotlinkName + ' Var hotlinkURL: ' + pageURL);

}

});

}

As you can see in the error I alert the variables I am trying to send and they are as follows:

Var hotlinkName: Testing

Var hotlinkURL: http://www.example.com/home

相关阅读:
Top