This doesn’t seem to work:
func = "getProductListings";
params = "{'user_id':1234,'short':true}";
window.opener[func](params);
can someone check my code please?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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 returnsNULL. Is there a parent window? … And does it have agetProductListingsfunction defined?Does your
getProductListingsfunction expect an object as the first argument? In that case, you’d want to remove the double quotes from theparams:params = {'user_id': 1234, 'short': true};