Passing window obj.function using javascipt CALL method

Within a window, the following method works to call a method in another window:


I would prefer to be pass “myMethod” as a variable from one window to another, and use javascript Apply or Call method to invoke the the above to return a value, such as:

fName = “parent.dhxWins.window(‘winName’)._frame.contentWindow.myMethod”;, true);

Have tried various variations of this (e.g., fname = myMethod,‘winName’)._frame.contentWindow, true) – etc., ), but not succeeding.

The objective is for the first window to pass a callback function to the second window, and return the user’s response from the second window back to the first window, invoking the callback.

Both windows are instantiated using html, and the html contains the scripts.