Is this possible?
var win = window.open(url);
win.func = function() {
win.someFunc();
// ...
}
Then I want func to be called, when win‘s scripts and DOM is fully loaded. jQuery solution will be good too.
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.
Why not just use this in your html that loads with window.open.
UPDATE: If you have to pass parameters than you can, as TJHeuvel stated, from ready function call function from opener window that calls someFunc.
Or you can have “global” variable, in your main window, that holds your parameters than in your someFunc() you can access it like
assuming that myparameters has param1 and pram2 fields.
UPDATE: examples
or