Hi. I have this:
while( $rowData = @mysql_fetch_assoc($selectRows2) )
{
?>
<div id="stemmeto"><a href="#" id="thelink" onclick="window.parent.OpenVote(<? echo $_GET['id']; ?>, '<? echo $rowData['username']; ?>');">
<?php echo $rowData['username']; ?> </a></div>
<div id="stemme">
<a href="#" id="thelink" onclick="window.parent.OpenVote(<? echo $_GET['id']; ?>, '<? echo $rowData['username']; ?>');">
<? echo $rowData['stemme']; ?></div></a><br />
<?
}
Now this should activate OpenVote function with (id, username) in the parent.window.. But for some reason this only works for first column, that comes out, nothing is happening when i click the others.. I have tried to remove that column, to check to see if its specially just that column, but it wasnt, its always the "first" column that echo´s out in the while(), that i can click on.. what should i do?
Here's the OpenVote script on the parent window(index.php)
function OpenVote(id, stemme) {
var postThisShit = 'battles/infoaboutvote.php?id='+id+'&stemme='+stemme;
$.post(postThisShit, function(data){
$(".showinfo").html(data).find(".getinfo").fadeIn("slow")
});
}
And the #thedialog on index.php:
<div id="thedialog" title="Showing..">
<p class="showinfo">
You shouldn't see this, something went wrong..
</p>
</div>