This code works when the webpage is on a Mac, but fails when on a PC. Changing the fourth line to work on a PC causes it to fail on a Mac. The solution of course is to test for which platform is being used then choose the correct format.
This code also works as expected when the same unchanged page is hosted by Geocities, Tripod, and Bravehost. And it will probably work ok on many other sites. However, it does not always work in all cases, so I was wondering if there is an easy way to alter this code so that it will work in most instances?
Or is there a completely different way to do this better?
[tt]
<SCRIPT LANGUAGE='javascript'><!--
var a = "host";
eval(a + " = location." + a);
a = (host == "") ? "/MHD/Desktop Folder/GeoCity" : "";
a = (host == " ? "/Athens/Thebes/6602" : a;
var bref = location.href.substring(0, 7) + host + a + "/";
document.writeln();
document.writeln("<BASE HREF='" + bref + "'>");
// --></SCRIPT>
[/tt]
mmerlinn
"Political correctness is the BADGE of a COWARD!"
This code also works as expected when the same unchanged page is hosted by Geocities, Tripod, and Bravehost. And it will probably work ok on many other sites. However, it does not always work in all cases, so I was wondering if there is an easy way to alter this code so that it will work in most instances?
Or is there a completely different way to do this better?
[tt]
<SCRIPT LANGUAGE='javascript'><!--
var a = "host";
eval(a + " = location." + a);
a = (host == "") ? "/MHD/Desktop Folder/GeoCity" : "";
a = (host == " ? "/Athens/Thebes/6602" : a;
var bref = location.href.substring(0, 7) + host + a + "/";
document.writeln();
document.writeln("<BASE HREF='" + bref + "'>");
// --></SCRIPT>
[/tt]
mmerlinn
"Political correctness is the BADGE of a COWARD!"