[eluser]adwin[/eluser]
[quote author="swhitlow" date="1210538373"]
adwin - thanks for the reply! Could you provide a quick example of this? I had tried to do this with just a
But, it did not seem to work. Any help would be greatly appreciated! Thanks![/quote]
I won't use that way ... I prefer to render the onclick directly like this
Code:
<?php
....
$counter = 0
foreach($results as $data){
.... // do whatever you want here ...
$links = "<a href='#' class='myclass' onclick='dosomething($counter);'> test </a>";
... // do anything else .. produce json data ?
$counter++;
}
...
?>
but if you still prefer the jquery event style ... i would recommend you to use attr.
Code:
<?php
// change above with
$links = "<a href='#' class='myclass' callerid='$counter'> test </a>";
?>
and use jquery like this
$(".myclass").click( function() {
alert($(this).attr('callerid'));
});
I won't mess the flexigrid.js library because when it updated I don't want to change my codes