jquery Ajax call resulting in Undefined Error in Firefox

Posted by Kamal on Stack Overflow See other posts from Stack Overflow or by Kamal
Published on 2010-03-22T10:55:16Z Indexed on 2010/03/22 14:11 UTC
Read the original article Hit count: 576

Filed under:
|
|
|

Hi

I've been pulling my hair out for the last few hours with this problem. And the googling has been hampered by the very vagueness of this. So let me apologise for that first.

Basically I'm using jquery and ajax (with C#) to return data from the backend and display that to the screen. The code works perfectly for firefox and IE. But when the data gets too large (??) (1500+ table rows) all I get is an undefined popup.

Debugging in firefox (3.6) it doesn't even go into the success method. Worse still it doesn't even go into the error method. A lot of superfluous information there, but I'd rather show everything I'm doing.

The Code

$j.ajax(
        {
            type: "POST",
            url: "AdminDetails.aspx/LoadCallDetails",
            data: "{" + data + "}",
            contentType: "application/json;charset=utf-8",
            dataType: "json",                
            success: function(msg) {
                $j("#CallDetailsHolder").html(msg.d);
                $j(".pointingHand").hide(); 

                var oTable = $j('#dt').dataTable({
                    "bProcessing": true,
                    "bPaginate": true,
                    "bSort": true,
                    "bAutoWidth": false,
                    "aoColumns": [
                        { "sType": 'html' },
                        { "sType": 'custdate' },
                       { "sType": 'html-numeric' },
                        { "sType": 'ariary' },
                        { "sType": 'html' },
                        { "sType": 'html' }
                    ],
                    "oLanguage": {
                        "sProcessing": "Traitement...",
                        "sLengthMenu": "_MENU_ Montrer",
                        "sZeroRecords": "Aucun enregistrement",
                        "sInfo": "_START_ à _END_ de _TOTAL_",
                        "sInfoEmpty": "0 à 0 de 0",
                        "sInfoFiltered": "(filtrée à partir de _MAX_ )",
                        "sInfoPostFix": "",
                        "sSearch": "Rechercher",
                        "sUrl": "",
                        "oPaginate": {
                            "sFirst": "premier",
                            "sPrevious": "Précédent",
                            "sNext": "suivant",
                            "sLast": "dernier"
                        }
                    },
                    "sDom": 'T<"clear">lfrtip'

                });

                $j('#CompteBlocRight0').unblock();

                $j('#btnRangeSearch').click(function() { oTable.fnDraw(); });

            },
            error: function(msg) {
                DisplayError(msg);
                $j('#CompteBlocRight0').unblock();
            }
        });               //$.ajax 
    }

The code definitely works. And even displays in IE without any issues.

Any help???

© Stack Overflow or respective owner

Related posts about c#

Related posts about jQuery