That won't work, i.e. you would alert 'undefined', because in the moment
of calling alert the remote call hasn't finished its job and
myReturnedStuff isn't assigned anything yet (assuming that you do an
asynchronous request).
Better:
$(myvar).load("/test_ajax", function (stuff) {
alert(stuff);
});
Shawn Tumey schrieb: