An example of such a link is:
<a href="http://webapps.prod.there.com/goto/goto?placename=Beacon+Manor"> link text here</a>
There is some subtlety in how the There host reacts to such a link, depending on where the actual .htm or .html file is located. If it is a file on your local computer (where the There client is running), then it simply does the teleport (if it is to an allowed destingation). If, however, it detects that the file was being served by an actual http server, external to There, then it returns a scary warning notice, offering a chance for the user to click again on the link (which it displays), but advising against doing so!
How does it know the difference? The answer is that when you click on a link, your browser sends, along with the link request, information on the "referring" web page. This allows the There server to detect external referrers. When the file is on your own computer, there is no referring web page.
So how can we make a link, on an external server, that doesn't trigger this overly scary warning message?
The answer is to use JavaScript, which runs in the client browser, to generate the action intended by the link. Then the There host does not see the referring web page and does not give the warning message.
Here is some sample code that goes in the <head> section of the html file:
<script language=javascript>
<!-- hide from old browsers
function goObj(dest) {
header = new String("http://webapps.prod.there.com/goto/goto?obj=")
self.location.href=header.concat(dest)
}
function goPlace(dest) {
header = new String("http://webapps.prod.there.com/goto/goto?placename=")
self.location.href=header.concat(dest)
}
// end hide from old browsers -->
</script>
Then, an individual link looks like this:
<a onclick="goPlace('Artandi+Cafe')"><font color="blue"
face="Arial"><u>Artandi Cafe</u></font></a>
or this:
<a onclick="goObj('123456789')"><font color="blue"
face="Arial"><u>South Pole</u></font></a>
The purpose of the font color and <u> and </u> tags is just to make the text "look like" a link. Otherwise you get ordinary text that is clickable, but shows no indication of being so. You could instead put the onclick attribute onto another kind of JavaScript object, a button, say. Even with underlined blue text, the text doesn't quite behave like a link: The browser cursor doesn't change to a hand when positioned on it! If anyone knows a workaround to this, let me know!
One final technical note: There is a source on the web that
claims that it is better to use
self.location.replace(url)
instead of
self.location.href = url
as above. I think
that the difference is only in whether the local browser preserves
the referring page (where the link is) in its Back-button list, and
not in what it sends to the There host -- but I am not completely
sure. I've tried it both ways and find no difference with the IE
browser, but some difference with Netscape (which is irrelevant to
There).