Using mtmcode.js version 2.3.2, dated 2002-02-24 with
Netscape 3.04 browser under Windows.
FIRST:
There is a 'do {...} while' loop in MTMresolveURL()
method which is a part of JavaScript 1.2 specification.
Netscape 3 is claimed to be a supported browser, but it
is compatible with JavaScript 1.1 only.
Suggested fix is to replace ‘do {...}while’ loop with ‘while
{}’ loop:
<find-what>
} else if(thisURL.indexOf("../") ==
0) {
tempString =
this.preHREF;
do {
thisURL =
thisURL.substr(3);
tempString
= tempString.substr(0, tempString.lastIndexOf("/",
tempString.length-2) +1);
} while(thisURL.indexOf
("../") == 0);
tempString += thisURL;
} else {
</find-what>
<replace-with>
} else if(thisURL.indexOf("../") ==
0) {
tempString =
this.preHREF;
while(thisURL.indexOf
("../") == 0) {
thisURL =
thisURL.substr(3);
tempString
= tempString.substr(0, tempString.lastIndexOf("/",
tempString.length-2) +1);
}
tempString += thisURL;
} else {
</replace-with>
SECOND:
The same story with regular expressions which are used
in MTMTrackExpand():
Suggested fix is:
<find-what>
var regExp
= /\\/g;
targetHREF
= targetHREF.replace(regExp, "\/");
</find-what>
<replace-with>
var j;
for(j = 0; j <
targetHREF.length; j++) {
if
(targetHREF[j] == "\\") {
targetHREF\[j\] = &quot;\/&quot;;
\}
\}
</replace-with>
THIRD:
In MTMDisplayItem().MTMClickedItem variable can
reference an object or it can be &#8216;false&#8217;. &#8216;item.number ==
MTMClickedItem.number&#8217; evaluation works in IE, Opera,
Netscape 4+, Mozilla, but not in Netscape 3. It throws
a error message.
Suggested fix is:
<find-what>
if(item.submenu && (item.url
== "") && (item.number == MTMClickedItem.number)) {
</find-what>
<replace-with>
if(item.submenu && (item.url
== "") && (MTMClickedItem ? (item.number ==
MTMClickedItem.number) : false)) {
</replace-with>
LAST:
I will attach my mtmcode.js, as you might find it easier
to use Beyond Compare (or other file comparing tool) to
find the changes. Note that you need to compare it
with mtmcode.js version 2.3.2, dated 2002-02-24.
Other changes you will notice there will be a lots of
variable declarations (like &#8216;var i&#8217;; and &#8216;var b=c=true&#8217;
replaced with &#8216;var b=true,c=true&#8217;). This is to suppress
warning messages generated by Sun's HotJava
browser. And a little addition of mine: &#8216;MTMShowRoot =
true;&#8217; configuration parameter which make it possible to
Hide the root node (caption).
Hepe this will help,
Alex
my mtmcode.js