I know it’s possible to call the calling function, but is it possible to call the function calling that function. Ok … that sounds a little confusing. Let me demonstrate:
pop.share(msg, function(response) {
if(response) response = true;
else response = false;
});
Basically a box pops up to ask the user to share. If the response is false I want to call pop.share … thus displaying the popup modal forcing them to share. Ok, this is probably not good logic or practice for a live site.
I was just lying in bed and I got a though “can that actually be done”. I was trying and trying with some test code and couldn’t figure it out.
Edit: A do while would not work if it was a modal as it’s not waiting for the users response, thus creating an infinite loop.
Try obsolete
arguments.caller? But since it is obsolete, it is not useful for live site.https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Functions_and_function_scope/arguments/caller