This doesn't seem to work:
func = "getProductListings";
params = "{'user_id':1234,'short':true}";
window.opener[func](params);
can someone check my code please?
This doesn't seem to work:
func = "getProductListings";
params = "{'user_id':1234,'short':true}";
window.opener[func](params);
can someone check my code please?
A few points you might want to check out:
When a window is opened from another window, it maintains a reference to that first window as window.opener
. If the current window has no opener, then this method returns NULL
. Is there a parent window? ... And does it have a getProductListings
function defined?
Does your getProductListings
function expect an object as the first argument? In that case, you'd want to remove the double quotes from the params
:
params = {'user_id': 1234, 'short': true};