I have a simple PHP snippet that generates n copies of the following code:
<p class="ShowSDB_L2" class="center" onClick="FSD_L2('<?php print dbG;?>','<?php print $sLID;?>')">Click Here to See Data</p> <div class="divSDB_L2"> </div>
It is generated using PHP, so the number of copies is unknown in front.
On another page, I have the following Javascript (using jQuery)
function FSD_L2(dbG,SlID) { $(".divSDB_L2").load("test15.php?dbG="+dbG+"&SlID="+SlID).css('display','block'); }
When the text above is clicked (Click here to see the data), it should add the contents of test15.php between the two DIV tags.
#Test15.php <?php $dbG = $_GET['dbG']; $SlID = $_GET['SlID']; print $dbG . " & " . $SlID; ?>
I have a problem, how to determine which of the links was clicked? Currently, if I have three copies and click one, all three copies are activated.
Hope I made it clear enough. I'm sure there should be an easy way, but I am completely new to Javascript / jQuery.
source share