and I have a page that needs to display the url that is currently in the address bar. it’s hard to understand why i need this w/o knowing my company’s product but i unfortunately can’t explain here.
when i put that code into an html file and then view it … it returns the whole string "file:///C:/Documents%20and%20Settings/aaron/Desktop/Untitled-1.htm "
which i know is different if i were on the web b/c of the number of /'s but it doesn’t seem to be truncating at all
[edit]
yes of course if there is no"/" at the end of the line the “m” in .com (or whatever the last letter is) will get cut off, but if I remember correctly browsers automatically end URLs with “/” and add “http://” to the beginning, so I don’t think this will be a problem.
[/edit]
there’s my html … the code worked fine when it was the only thing on the page but when i tried to insert it into the text … it doesn’t work … it still returns the url … but it doesn’t do the truncation
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Anonymizer Block Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="A30101">
<table width="400" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> <p align="center"><img src="AnonLogo-WHITE.gif" width="400" height="78"><br>
<b><font color="#FFFFFF" size="4" face="Arial, Helvetica, sans-serif"><br>
You have chosen to block <SCRIPT LANGUAGE="JavaScript">
<!--
{
var myUrl = String(window.location);
document.write(myUrl.slice(7, -1));
}
// -->
</SCRIPT>.</font><font color="#FFFFFF" size="5" face="Arial, Helvetica, sans-serif"><br>
<font size="4"><br>
</font> </font><font color="#FFFFFF" size="4" face="Arial, Helvetica, sans-serif">If
you wish to view it, </font></b><b><font color="#FFFFFF" size="4" face="Arial, Helvetica, sans-serif">please
select a different privacy level for this site.</font></b></p>
</td>
</tr>
</table>
</body>
</html>