Swapping frames causes zero widths in Firefox/not working in NN
Hi,
I have an application that has 2 navigation menus that can be shown or hidden when buttons are clicked. Each menu is in a separate frame in a frameset document. If one menu is shown and the other hidden, then I need to put the hidden one into the leftmost column of the frameset (which requires changing frame order) and set its width to 0 using the cols attribute of the frameset.
In order to determine which ones are shown or hidden, I need to get the widths of each frame. To swap frames, I use insertBefore() on the frameset object. When I do insertBefore() in Firefox, the frames get swapped, but the page flashes innerWidth attribute no longer gives the correct value for the frames. In Netscape the insertBefore() does not swap the frames at all. I can only get it to work in IE.
I have made a few web pages that show this error. In the attachment, you should notice that the innerWidth of both frames becomes 0 after hitting the 'Swap Frames' button twice.
I have attached the sample HTML files here. Main.html is the frameset document. Please tell me if you know how to make it work for Firefox 1.5.0.7/Netscape 8.1.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.