Page 1 of 1
get the value of which link I click
Posted: Sun Sep 04, 2011 8:37 pm
by Lphp
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

Re: get the value of which link I click
Posted: Mon Sep 05, 2011 1:22 am
by social_experiment
Something like this: page.php?action=like / page.php?action=unlike ?
Re: get the value of which link I click
Posted: Mon Sep 05, 2011 3:54 am
by Lphp
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
Re: get the value of which link I click
Posted: Mon Sep 05, 2011 11:58 am
by social_experiment
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
Re: get the value of which link I click
Posted: Wed Sep 14, 2011 2:54 am
by Lphp
i get it by jquery