Forum Moderators: open
<meta http-equiv="refresh" content="10; URL=javascript:window.open('page.html','_top');">
However, that will open an entirely new window as well. I think there should be a pure javascript approach, outside the meta refresh tag -- but I'm drawing a "_blank" ;) on it right now.
I also found this code that seems to break out of a masked url in the same window but I do not know how to customize / setup for my needs.
// Create the image url and write it into the page.
document.write("<a href=\"http://" + g_server + "/");
document.write(""+site+"\" target=_top>");
document.write("<img src=\"http://"");
document.write(""+site);
document.write(""+escape(g_r));
if (g_ip!= "")
document.write("&ip="+g_ip);
document.write("&hours="+g_hours);
document.write("&minutes="+g_minutes);
document.write("&rtype="+g_rtype);
document.write("\" border=0 title=\"Site Meter\"></a>");
<script type="text/javascript">
if (top!=self.parent)
top.location=self.parent.location;
</script>
Is this masking being enforced by your web host or some third party?
Maybe the problem is what you are calling "masked". I was assuming frames, but is this a frameset? If so, did you put the javascript in the head section of the framed document that the link is targeting (NOT the frameset document, for example?)
When an approach doesn't work, does View Source show your newly added code?
I got there in the end.
I pasted:
<script>
// (C) 2000 www.example.com
// http://www.example.com
// Free for all users, but leave in this header
if (parent.frames.length > 0) {
parent.location.href = self.document.location
}
</script>
into my html page and found that it made the url in the browser show the true url.
You see I needed a landing page so the site meter showed the masked url then I needed to refer the user to another page where I wanted the true url to be seen.
Thanks
Paul
[edited by: tedster at 7:01 pm (utc) on June 30, 2006]
[edit reason] use example.com [/edit]