Passing Parameters To Callback Function In DWR

DWR is one of Most Finest written libraries for web development which has made life of many developers easy. It made developers feel AJAX as Kids Langugage. It has created blanket over a rough path of Road Which Javascript Provides while manipulating Objects. Here i would explain how to pass Parameters to A callback function in DWR. I assume reader to be aware of how DWR works before reading this

I’m attaching code snippet which is self explanatory

// define an erasure function to store a reference to
// dataFromBrowser and to call dataFromServer
var callbackProxy = function(bucketMap) {
fillBucketTypes(dataFromServer, dataFromBrowser );


dataFromBrowser is the parameters which is passed here
function fillBucketTypes(bucketMap,dataFromBrowser ){
//alert("In Filling "+presentBucketTypeId);
var tempBucketTypeId = "bucketType" + String(dataFromBrowser );
dwr.util.addOptions(tempBucketTypeId, bucketMap, true);