In the following, assuming jsonDataM is defined top of my script (so scope of this variable should be good):
mapqueryform.observe('submit', fetchData.bindAsEventListener(mapqueryform, jsonDataM)); fetchData routine make an ajax request, passes along jsonDataM to the handler routine, at which time the responseJSON result is assigned to the json parameter. I'm expecting my global jsonDataM to have valid json data, but it is just NULL. To be clear, here is the function definitions for fetchData and the handler: function fetchData(e, jsonData) { ... } function handleFetch(response, jsonData) { ... } and in fetchData, here is the onComplete: onComplete: function(response) { handleFetch(response, jsonData); } -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.