Problem . Old knowledge base software that for some reason has corrupted links. This is a series of nested frames. Some point to the right goal, some not, and many are simply broken. This makes using the knowledge base cumbersome when it doesn't work smoothly.
What am I trying to accomplish . I want to determine when a particular frame is loaded, and then parse the frame document, replacing the anchor labels with the correct hrefs and target.
Resources and limitations . I have access to some .aspx pages. Targeting currently contains a frameset that loads a knowledge base document. However, the src of this frame is not the actual .aspx page (physical file) - an insecure way to create and uncertainty about how documents are stored. I see the src list but cannot find it on the web server that I have access to.
Basic information: Pages are loaded using .aspx (I do not understand parts of this well and do not have access to anything much deeper). An .aspx page has a set of frames that is created when the page loads.
Sample Framset code from an .aspx file:
<FRAMESET id="FrameSetMainView" runat="server" border="0" framespacing="0" frameborder="0"> </FRAMESET>
I tried adding onload to the FRAMESET tag (this results in a page error when trying to load). A set of frames takes the body, so I cannot add an inline script to the bottom of the page to run it after loading.
In addition, b / c is the age of the product - it is forcibly switched to compatibility mode. Therefore, you must use equivalent IE7 support. (no addeventlistener )
Current Strategy:. I think I can work, but I feel awkward, like everyone else, adding a script to <head> . Sort of:
<SCRIPT> function load(){ var frameset = window.frames; if(frameset.length > 0){ </SCRIPT>
Other solutions?