Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#119747 - 07/10/2002 19:56 Javascript and Anchors
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Before I go and taint myself again, I suppose I should ask if it's even possible. I need a way of knowing what the anchor link is in a URL. AKA, I need to do this:

My link = http://www.somesite.gov/thenameofthefile.html#anchor23
my anchor = anchor23

Is this possible with Javascript? It's not with any server side language, because browsers don't pass that part of the URL to the server.

Thanks

Top
#119748 - 07/10/2002 22:09 Re: Javascript and Anchors [Re: drakino]
ninti
old hand

Registered: 28/12/2001
Posts: 868
Loc: Los Angeles
Try window.location, as in:

<script language="JavaScript">
url = window.location;
alert(url);
</script>

You can parse it out from there.
_________________________
Ninti - MK IIa 60GB Smoke, 30GB, 10GB

Top
#119749 - 08/10/2002 07:19 Re: Javascript and Anchors [Re: ninti]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Cool, looks like JavaScript can see it. Time for me to relearn what I need for the script.

Thanks

Top