MetalTux
MetalTux

Reputation: 13

Uncaught TypeError: Converting circular structure to JSON (only on Chrome)

I have a problem with my application, but I can't see the error. It works fine in Internet Explorer and Firefox, but when I try to test it in Chrome, i got the error.

My JavaScript code is:

function cargarInfo(paginaActual) {
    pagina = paginaActual;
    var filtros = {
        Ticket: $("#txtFiltroTicket").val(),
        Empresa: $("#txtFiltroEmpresa").val(),
        Cliente: $("#txtFiltroCliente").val(),
        Contacto: $("#txtFiltroContacto").val(),
        AreaEmpresa: $("#txtFiltroAreaEmpresa").val(),
        TipoEvento: $("#txtFiltroTipoEvento").val(),
        DescripcionEvento: $("#txtFiltroDescripcion").val(),
        FechaInicio: $("#txtFiltroFecIni"),
        FechaFin: $("#txtFiltroFecFin"),
        Creador: $("#txtFiltroCreador").val(),
        Estado: $("#txtFiltroEstado").val(),
        Asignado: $("#txtFiltroAsignado").val(),
        Solucion: $("#txtFiltroSolucion").val(),
        LugarCierre: $("#txtFiltroLugarCierre").val()
    };
    $.ajax({
        type: 'POST',
        contentType: "application/json;charset=utf-8",
        url: '/ListadoTickets/GetListado',
        dataType: 'json',
        data: JSON.stringify({ estadoTicket: '1', fecDesde: '', fecHasta: '', datosFiltro: filtros, pagina: paginaActual }),
        traditional: true,
        success: function (msg) { onListadoOK(msg); },
        error: function (ajaxresult, status) { onError(ajaxresult, status); }
    });
}

Can you help me please?

Note that "datosFiltro" is an Object in the Server Side function...

Best regards...

Upvotes: 1

Views: 1578

Answers (1)

epascarello
epascarello

Reputation: 207527

It is because of these two lines

FechaInicio: $("#txtFiltroFecIni"),
FechaFin: $("#txtFiltroFecFin"),

They are missing .val()

FechaInicio: $("#txtFiltroFecIni").val(),
FechaFin: $("#txtFiltroFecFin").val(),

Upvotes: 1

Related Questions