Parameter for Dataprocessor

Hi

I am dataprocessor with the standard following code:

var v2t = 21;
function doOnRowSelect2(rowId, cellId) {
                        alert("v2t = "+v2t);

        }
function buildGrid(mygrid) {
            mygrid.setImagePath("../codebase/imgs/");
            mygrid.setHeader("Pseudo Joueur, Nom, Prénom");
            mygrid.attachHeader("#text_filter,#text_filter,#text_filter");
            mygrid.setInitWidths("130,130,130");
            mygrid.setColAlign("left,left,left");
            mygrid.setColTypes("ro,ed,ro");
            mygrid.setMultiLine(false);
            mygrid.enableDragAndDrop(true);
            mygrid.setSkin("dhx_skyblue");
            mygrid.enableSmartRendering(true,1000);
            mygrid.init();

        }

        grid2 = new dhtmlXGridObject('grid2_container');
        buildGrid(grid2);
        grid2.attachEvent("onRowSelect", doOnRowSelect2);
        DataProcessor2 = new dataProcessor("../codebase/php/update.php?v2t=" + v2t);
        DataProcessor2.init(grid2);

As you see…when I click on a row of this grid it displaying in alert the v2t value.
This value is updated by another function not shown…and when I click on a row i can see the the v2t value has been changed. But…When I do a delete or an update…then the value of v2t send to update.php is always 21 (the value of initalisation) I have no idea why and how to solved that.

Is there a reason the the data processor keep the value of v2t initalistion instead of the current value?

Thanks in advance
D

The way how you are using var, embeds it in the string in moment of dataprocessor init, so it can’t be changed after that.

The next may help

DataProcessor2.attachEvent("onBeforeDataSending", function(){ DataProcessor2.serverProcessor="../codebase/php/update.php?v2t=" + v2t; return true; });

You are a king Stanislav…it should be place before DataProcessor2.init(grid2); then it works fine
Thanks