Ajax request has invalid characters
ajax, jquery
Solution
Function is a reserved keyword. You need to either change it, or wrap it in quotes:
data: {
"function": 'gettestvaraibles',
"game_id": '630',
"game_score": '50'
},
Problem
I created an AJAX request. In the new browsers it works fine, but IE7 tells me there is an error with characters in the line, where `function: 'gettestvaraibles'` stands. Can someone tell me where the error could be? ``` $.ajax('http://testurl/?eID=testid', { data: { function: 'gettestvaraibles', game_id: '630', game_score: '50' }, type: 'post', dataType: 'json', error: function(jqXHR, textStatus, errorThrown) { console.log(jqXHR); alert(errorThrown.message); }, success: function() { } }); ```