johnvidhya
08-23-2004, 12:06 AM
I want to invoke the other Page's javascript function from Main Page Javascript Function using Javascript. Is it Possible? If Possible please give me sample code.
|
Click to See Complete Forum and Search --> : calling javascript function of other Pages. johnvidhya 08-23-2004, 12:06 AM I want to invoke the other Page's javascript function from Main Page Javascript Function using Javascript. Is it Possible? If Possible please give me sample code. Kor 08-23-2004, 03:11 AM You may access an object or a javascript function from another page only if pages belongs to the same domain (from obvious security reasons) Furthermore, the two pages (the "caller" and the "callee" have to be on javascript relationship one to eachother = one of them must have been opened by the other) If so: 1. from opener to opened if newp=window.open('newpage.html','_blank') than the reference is newp.document.object or newp.a_function() 2. from opened to opener parent.document.object or parent.a_function() There is another possibility to provoke a javascript response from another page by passing a parameter in address bar (used if the opened page must be _self targeted) can you detail a little your needs to see which method is proper? webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |