Reputation: 2578
I my application i am having three links, on clicking the link i need to find which link has been clicked and need to pass some unique information to the next page.
Kindly help
Upvotes: 1
Views: 584
Reputation: 2222
It would be good if you could clarify this a bit. Because there are many ways if solving this without Javascript...
You can either add a paramater to the URL link that is clicked. For instance instead of:
<a href="about.php">About</a>
Use:
<a href="about.php?clicked=about">About</a>
Then simply use that value in using Javascript on the following page by using for instance this script: http://snipplr.com/view/799/get-url-variables/
If you are using a server-side scripting language like PHP you can pick up on what page refered to the page your on.
echo $_SERVER['HTTP_REFERER']
There are more examples, just comment on this if you want me to give you more.
Upvotes: 2