views:

26

answers:

1

I have the following code that works on firefox and chrome

$("#adicionarItem").click(function(){
    $.ajax({
        type: 'GET',
        url: $("#formAdicionaItem").attr("action"),
        data: $("#formAdicionaItem").serialize(),
        success: function(response){
            alert($("div#errors", response).size());
        }
    });
});

In IE the alert always returns zero. In firefox/chrome it returns 1 wich is the expected value. Does anyone know if this is a bug or if I am doing something wrong?

A: 

This would happen if the response is somewhat malformed.
Make sure that all of the tags in the response are correctly closed.

SLaks
thats not it. I validated the markup at w3c markup validator.
VinTem
Can you show us the markup?
SLaks
its the full page that is returning... it dosent fit well here.
VinTem