My code: function get_data_default() { new Ajax.Request('/adress', { method:'post', asynchronous:true, onSuccess: function(data){ return data.responseText.evalJSON (true); }, onFailure: function(){ alert('Something went wrong...') } }); } } function show(){alert(get_data_default());}
I want to function get_data_default return data recived from OnSucces function. How do that? -- 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-scriptacul...@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.