Need to Adjust URL for dataProcessor

Hi,

We currently run an application which requires all cell updates to be posted to a url like below:
updateproduct_singlecell.php?query_type=modify_item
or
updateproduct_singlecell.php?query_type=sold_items

Whenever we run the below code it appears to create another instance of the dataprocessor and update the grid however many times it has been loaded.

Is there a way we can adjust the URL to which the dataprocessor posts data too?

Or is there a way we can destroy the myDataProcessor Object effectively?
(delete myDataProcessor; does not work at all)

Thanks in advance
Joe

function initUpdateProcessor(query_type){

    myDataProcessor = new dataProcessor("updateproduct_singlecell.php?query_type="+query_type);
    myDataProcessor.enableDataNames(true);
    myDataProcessor.setUpdateMode("cell");
    myDataProcessor.defineAction("error",myErrorHandler);
    myDataProcessor.setTransactionMode("POST");
    myDataProcessor.init(mygrid);
    function myErrorHandler(obj){
        alert("Error occured.\n"+obj.firstChild.nodeValue);
        myDataProcessor.stopOnError = true;
        return false;
    }
    
      function displayfalse(value,colName){
      //alert(value+colName);
      // return false;
    }
}

function destroyUpdateProcessor(){
if(myDataProcessor){
alert(‘killed it’);
delete myDataProcessor;
}else{
alert(‘no need to kill it’);
}
}

Currently there is no way to detach dataprocessor from an object.
But you can use the next to reset url of already existing dataprocessor

myDataProcessor.serverProcessor = "updateproduct_singlecell.php?query_type="+query_type;

Many thanks for that!

Works perfectly!