loader.doSerialization() Error

I’m using the following code to get a xml message sent by the server:



function doOnRowSelected(id){



    var loader = dhtmlxAjax.postSync(“prova.php”,“ACCIO=READ&ID=”+id);

        

    if(loader.xmlDoc.responseXML!=null && loader.xmlDoc.doXPath(“/vehicles”))

        alert(“We Got Response\n\n”+loader.doSerialization())

    else

        alert(“Response contains no XML”)

}



and debugging with Firebug I see I h’ve got the error:



uncaught exception: [Exception… “Could not convert JavaScript argument arg 0 [nsIDOMSerializer.serializeToString]” nsresult: “0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)” location: “JS frame :: artek/kmgest/codebase/dhtmlxcommon.js :: anonymous :: line 88” data: no]





I’m using the free version of dhtmlx suite 2.1 but I think this feature is fully suported.

Do you know what’s the reason of this error?



As I can see in firebug, the client recives the message as expected:



<?xml version="1.0" encoding="UTF-8"?>





2354-XSA

Peugeot

409

1.3 Diesel

BXZ123456

<data_matriculacio>2009-08-11</data_matriculacio>

Blanco Sepia

999.99

12000.00

<id_proveidor>11</id_proveidor>

<id_campa>11</id_campa>

<id_client>11</id_client>

<id_intermediari>11</id_intermediari>

<id_venedor>11</id_venedor>

1340.00

<id_tipus_matriculacio>11</id_tipus_matriculacio>

<preu_compra_brut>12000.00</preu_compra_brut>

<import_danys>0.00</import_danys>

<descomptar_danys>N</descomptar_danys>

<preu_venda>12500.00</preu_venda>

<preu_venda_transport>215.00</preu_venda_transport>

<preu_transport>200.00</preu_transport>

<id_transportista>11</id_transportista>

11

<recepcio_cmr>2009-08-11</recepcio_cmr>

<id_estat_vprov>11</id_estat_vprov>

<id_estat_vcli>11</id_estat_vcli>

<id_proforma_cli>11</id_proforma_cli>

<id_factura_cli>11</id_factura_cli>

<proforma_prov>11</proforma_prov>

<data_proforma_prov>2009-08-11</data_proforma_prov>

<factura_prov>11</factura_prov>

<data_pagament_prov>2009-08-11</data_pagament_prov>

<data_cobro_artek>2009-08-01</data_cobro_artek>

<altres_despeses>100.00</altres_despeses>









What I want is to select a row from the grid and fill in a form with all columns of the selected row. Apart from the problem previously mentioned, another doubt I have is how can I recover each individual item I’ve received from the server?

If you have a sample that shows the way to do it I’ll appreciate it very much.



Many thanks in advance for your valuable help.



Best regardas,





Antoni

the issue wasn’t reproduced locally. We have attached the sample
1250501412.zip (7.58 KB)

Alex,
Thank you for your answer.
I think I found the cause of the problem. It was an extra character in he code that don’t generates a error but was the cause of the problem. After removing this character (}) it worked ok.

Many thank for your help.

Best regards,


Antoni