I have a 3rd party generated frameset (from a help system) and I can add code to the subframe that has my content pages. I cannot modify the other frameset content since it is generated by a build process.
I can have some js code myhandler()
on each of my HTML content page that gets loaded into the subframe. This myhandler()
is triggered to be called when an action occurs in the top frame.
I would like to create the function in the subframe but have it owned by the parent (top) frame, so that it only gets created once meaning I can test if top.myhandler
is already set and if so it just reuses it.
When the subframe is loaded with different content HTML then the myhandler()
function that was created in the previous content page is no longer accessible when the parent action triggers the call to it.
Is this possible in javascript for a frame to create a function in another frame? Or is there another solution to this?