0

I did this jquery to basically check on a php page and turn whatever the result is. It is working fine in other browsers but unfortunately I am having issues with IE. The bad news for this is that most of the users will be using IE.

$(document).ready(function() {
    $('#value').change(function() {
        $.ajax({
            type:'POST',
            url:'../validation.php',
            data: {
                validate_year:$('#Year').val(),
                validate_value:$('#value').val(),
                validate_domain:$('#Domain').val(),
            },
            success: function (data) {
                $('#status').empty().append(data).addClass('red_validate');
            }
        })
    });
});

how can I making this work on IE. Thanks

3
  • Please provide details of exactly how it is not working in IE. Does it throw an exception / display an error message etc? Commented Nov 19, 2013 at 16:10
  • 4
    What version of jQuery are you using and what IE versions are broken? Commented Nov 19, 2013 at 16:10
  • 6
    IE doesn't like trailing commas in object literals, so take the comma off of the end of validate_domain:$('#Domain').val(), Commented Nov 19, 2013 at 16:12

1 Answer 1

3

Try removing the trailing comma from the last item in your data object:

data: {
    validate_year:$('#Year').val(),
    validate_value:$('#value').val(),
    validate_domain:$('#Domain').val() // <--- Should NOT have a comma
},
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.