I am wondering if the following can be accomplished with javascript
(and if so, if you think javascript is an appropriate solution). I'm
afraid my javascript skills lack. I need to build a hyperlink that
includes the current web page URI. When clicked, the current page is
then processed by a program. For example, it would look something
like this:
<a href="http://some.program.com/index.php?current-web-page-URI">text
etc.</a>
where "current-web-page" would be the full URI,
http://whatever.com/stuff/index.html
Resulting in:
<a
href="http://some.program.com/index.php?http://whatever.com/stuff/index.html">text
etc.</a>
Thus I need a way to grab the current web page's URI for the
hyperlink. This hyperlink would be on numerous different pages and is
why the page's URI will differ.
They're not PHP generated pages, though that thought is a possibility,
else I would use something like PHP's $_SERVER['REQUEST_URI']
While a server side solution might be preferable to a client side
solution, people using the site don't have javascript turned off
because of other javascripts at the site.
Therein is my situation. If anyone has comment or suggestions on how
to script this, I would be much obliged.
TIA