how to call a javascript function in the top frame? -


It looks really simple, but how can I call the JavaScript function defined in the top-level HTML? top html doctor - 1 level frame - second level frame

in my top HTML doctor is a function called testFn). In the second level, I have the onclick = "top.testFn ();" There is a button with , but it does not call testFn (). In Firebug if I top.testFn (); I use a clock to execute then it says that TypeError: testFN () is not a function.

Will all this work only - in that situation there is a problem with my documents, or is there any other way of calling the function in the top-level window? testfn () is not a function

Your code looks correct if it says that testFn () is not a function < / Code> So it's probably not you have to do this to ensure onload = "testFn ();" Click

Have you tried working there? There may be some javascript error, so that your testFn function is not being completed successfully.


Comments