Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
This has nothing (nothing!) to do with Perl at all. If you eliminate the $.get call and replace it by something else that calls your callback, you will see exactly the same. Your aux_state function never returns a value, because it doesn't have a return statement:
The return statement you see is for the callback function that gets invoked asynchronously by jQuery. The aux_state function returns immediately and returns no value. To capture the return value of your $.get() call asynchronously in Javascript, you will have to pass in another callback to aux_state which then gets invoked once the value is available. This is what people name Callback Hell. In reply to Re: jQuery issue with Dancer2
by Corion
|
|