get the value of which link I click
Moderator: General Moderators
get the value of which link I click
I have two link like and unlike I would like to handle click like hidden the unlike and get the value on which link I click , how to hande this 
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: get the value of which link I click
Something like this: page.php?action=like / page.php?action=unlike ?
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Re: get the value of which link I click
do understand your suggestions
mean time I have
<span style="font-size:10px; color:#666666; float:right"> <a href="#" class="like_button" id="tag<?php echo $row2['id']; ?>" name="tag" onclick="(this.innerHTML=='like')? this.innerHTML='unlike' : this.innerHTML='like'; return false;" >like</a></span>
do not how to continue
mean time I have
<span style="font-size:10px; color:#666666; float:right"> <a href="#" class="like_button" id="tag<?php echo $row2['id']; ?>" name="tag" onclick="(this.innerHTML=='like')? this.innerHTML='unlike' : this.innerHTML='like'; return false;" >like</a></span>
do not how to continue
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: get the value of which link I click
Code: Select all
// this gets the text you use for the link
document.links[x].text
// where x is the value of the link in the links[] array
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Re: get the value of which link I click
i get it by jquery