Hi Richard Thanks a lot. I will start read John Resign Book and study a lot JavaScript.
Yes the solution is declarate the variable before but I would like this varaible be global. I dont recommend use var because will turn it local So I did $(document).ready(function(){ check1 = null; function checked(check) { this.check = check } $("#ajax").ajaxForm({ success: function(data) { check1 = new checked(data) // do stuff with data; } }); $("#target").ajaxSuccess(function(request, settings){ $(function() { alert(check1); }) }); .... And it is working!! So we can test response of any ajax response. But isnt already. When I dedug I can see the value into check1 but when the alert run print [object Object] So the result is into this object "check1". How can I access the value of an object in Javascript? Thanks for your help, And David thanks too, I am trying test all ajax response no matter where they came from. Regards Mario Moura 2007/12/15, David Serduke <[EMAIL PROTECTED]>: > > > On Dec 14, 1:06 pm, "Richard D. Worth" <[EMAIL PROTECTED]> wrote: > > $("#target").ajaxSuccess(function(request, settings) { > > if (check1 == "something") { > > $(this).append(check1); > > } > > > > }); > > I believe the first parameter for ajaxSuccess functions is the event. > Then comes the request and settings. So iirc that would be: > > $("#target").ajaxSuccess(function(e, request, settings) { > if (request.responseText == "success") { > alert("Got a successful response"); > } > } > > Also untested. :) > > David > > -- Mário Alberto Chaves Moura [EMAIL PROTECTED] 31-3264-6203 31-9157-6000