Hi You would use a JavaScript closure for that. The OpenLayers.Function.bind can create that closure for you.
Cheers, Eric 2009/3/16, Zer <zer_m...@hotmail.com>: > > Hi list, > > Is there a way to pass a parameter to the callback method that is called in > an ajax request? > > Something like this: > > myRequest = OpenLayers.Request.GET( > { > url :myUrl, > callback :myCallback(myParameter) > }); > > and then: > > function myCallback(response, myParameter) { > .... > > > Thanks, > > > -Z > > -- > View this message in context: > http://n2.nabble.com/Passing-parameters-to-ajax-request-callback-method-tp2487503p2487503.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Envoyé avec mon mobile _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users