"Jerry Sievers" <jerry@jerrysievers.com> wrote in message
news:m3mzo75een.fsf@prod01.jerrysievers.com...[color=blue]
> JS Programmers, "I'm a server-side coder PHP, Postgres etc...
>
> My question; Given the following anchor
>
> <a href="http://www.somesite.com/somefile.html">link text</a>
>
> Is there a way to code an onClick event to call a script and pass the
> href URL and link text?
>
> That is; We'd like to put an identical piece of JS code into each
> anchor tag essentially to have the anchors, when clicked call one
> script which does logging of the URL and link text before doing a
> redirect.
>
> With no working knowledge in JS, only some past background reading, my
> assumption is that something like this may be valid;
>
> onClick="load(loggingScript.php?url=anchor.url&tex t=anchor.text)"
>
> Please advise.
>
> TIA[/color]
Horribly bad idea.
"Note that you should not build a redirect page that takes an arbitrary
URL, as this can be abused in cross-domain attacks. Always build your
redirect pages to take an opaque identifier that then maps back to a URL
you control and know to be trustworthy."
<url:
http://blogs.msdn.com/ptorr/archive/...17/439798.aspx />
--
Grant Wagner <gwagner@agricoreunited.com>
comp.lang.javascript FAQ -
http://jibbering.com/faq