[jsmenu-codedev] Fixing the IE6 bug: 'replace' not supported
Status: Inactive
Brought to you by:
nettrom
From: Morten W. <war...@on...> - 2001-11-25 20:20:20
|
as I just mentioned on the yahoogroups mailing list the menu has a back-button bug in IE6. from what I've been able to test IE6 doesn't support the 'replace' argument to document.open(), which the menu uses to make sure the rewriting of the menu frame doesn't add to the history list. the call to document.open() is done in line 205 in the CVS version: MTMDoc.open("text/html", "replace"); I'm not exactly sure how to go about fixing it, but I'm thinking along the lines of using the IE method insertAdjacentHTML(). the thing is, that when I first do things I prefer to do them well, so I am considering wanting to rewrite the frame usage so that the menu uses inserAdjacentHTML() to manipulate the document in IE6, and the W3C DOM methods in Netscape 6/Mozilla. I'm thinking along these lines: 1: have only one frame, it name is not important (but keeping it named 'code' is probably a good idea), containing code.html 2: in code.html load code that identifies the browser, just like it does now 3: if IE4+ or NN6, wait to the document is loaded, then use the appropriate dHTML methods to populate the document according to the user setup, showing the menu 4: if NN3, NN4 or Opera5/6, output a frameset code containing two frames, one for the code, one for the menu, with appropriate unique names. rename the parent frame to 'code' so the tracking code works, and make sure there's an object there pointing to MTMDisplayMenu() if this is done, then it should be possible to have the menu running without frames quite easily since the menu no longer needs the parent frameset to function (if we keep the HTML target-attribute usage). having an element in the document with an id of "mtmenu" that'll be populated by the code should be all. problem then is how to expand/collapse submenus, but that's a later issue. comments, anyone? Morten! -- "...a liquid which was almost, but not quite, entirely unlike tea." My opinions are not necessarily those of my provider, not necessarily mine, and probably not necessary. |