I have some dynamically created links in my pages and what I need to do is when I click on the link, I should pass the name of the link to another page. So, please show me a way to accomplish this. Thanx in advance 🙂
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are using jquery, you can use :
Of course the html an so are not good, but the click thing is what you need.
Then you could use ajax, or a parameter in the target URL to give the link to the other page.
But why don’t you generate that when creating links?
I mean add a
href="mylink?from=mylink".Edit: corrected with your comment. What you need is
text()rather thanattr('href').