P
Phil Powell
[SCRIPT]
<script type=\"text/javascript\">
<!--
var browserArray = new Array(\"Microsoft Internet Explorer\",
\"Netscape\");
if (browserArray.in_array(navigator.appName, browserArray) &&
navigator.appName == \"Microsoft Internet Explorer\" &&
parseInt(navigator.appVersion) >= 4
) { // IE USERS
var url = \"http://$serverName\";
var title = \"[regsub {"} $brand {\"} newBrand; set
newBrand]\";
document.write(' <A
Href=\"javascript:window.external.AddFavorite(url, title);\" return
true;');
document.writeln('\">${smFont}BOOKMARK ' +
title.toUpperCase().replace(new RegExp(/(ä)|ä/),
String.fromCharCase(228)) + '</font></a>');
} else if (browserArray.in_array(navigator.appName, browserArray))
{ // NETSCAPE, ETC USE CTRL-D
document.writeln('${smFont}PRESS (CTRL-D) TO BOOKMARK ' +
title.toUpperCase().replace(new RegExp(/(ä)|ä/),
String.fromCharCase(228)) + '</font>');
}
document.writeln(' |');
//-->
</script>
[/SCRIPT]
When run, this script fails to recognize the correct browser; I'll be
in IE and it'll think it's not IE.
When also run, this script fails to replace "ä" with
String.fromCharCase(228) as well.
Please help, it's affecting a live site
Thanx
Phil
<script type=\"text/javascript\">
<!--
var browserArray = new Array(\"Microsoft Internet Explorer\",
\"Netscape\");
if (browserArray.in_array(navigator.appName, browserArray) &&
navigator.appName == \"Microsoft Internet Explorer\" &&
parseInt(navigator.appVersion) >= 4
) { // IE USERS
var url = \"http://$serverName\";
var title = \"[regsub {"} $brand {\"} newBrand; set
newBrand]\";
document.write(' <A
Href=\"javascript:window.external.AddFavorite(url, title);\" return
true;');
document.writeln('\">${smFont}BOOKMARK ' +
title.toUpperCase().replace(new RegExp(/(ä)|ä/),
String.fromCharCase(228)) + '</font></a>');
} else if (browserArray.in_array(navigator.appName, browserArray))
{ // NETSCAPE, ETC USE CTRL-D
document.writeln('${smFont}PRESS (CTRL-D) TO BOOKMARK ' +
title.toUpperCase().replace(new RegExp(/(ä)|ä/),
String.fromCharCase(228)) + '</font>');
}
document.writeln(' |');
//-->
</script>
[/SCRIPT]
When run, this script fails to recognize the correct browser; I'll be
in IE and it'll think it's not IE.
When also run, this script fails to replace "ä" with
String.fromCharCase(228) as well.
Please help, it's affecting a live site
Thanx
Phil