0
votes

question says it all... code:

$(document).ready(function() {
                dataToLoad = 'showresults=true';
                $.ajax({
                    type: 'post',
                    url: 'submit.php',
                    datatype: 'html',
                    data: dataToLoad,
                    async: true,
                    success: function(data){

                        $('#results').html(data);   
                    },

                });
});
1
Have you alerted your data? What's that give you?slandau
alerted ok on extra browsers... the fix was actually the comma after the closing success bracketMatt Nathanson

1 Answers

1
votes

You should use

dataType: 'html'

instead of

datatype: 'html'

and remove the trailing comma at the end (IE<=7 will throw error)

If the problem persists, add an error callback to see if there's an error

error: function(xhr, status, errorThrown){
   alert("Error:\n" + status);
}

Hope this helps. Cheers