javascript - open window and run function on that window -
i'd open new window, window has list of objects, , these objects should filtered based on selection previous window. figured can filter list through function, how run said function?
this able do:
var popup = window.open('pageurl'); $(popup.document).ready(function() { // function should popup.alert('helloworld'); });
but how change alert function?
if have function on other app , function test() { alert('helloworld'};
how run function first app?
swapping popup.alert('helloworld');
popup.test();
did not work.
you need reference window opened call functions in new window, like:
var onewwindow = window.open("new.window.url", "mywindow"); onewwindow.onload = function(){onewwindow.window.newwindowfunction();};
Comments
Post a Comment