Forum Moderators: open
echo "<p>";
echo "<a href='profile.php?id=$user_id'>":
echo $username;
echo "</a>";
echo "</p>\n";
If i were to add the javascript to that, i wouldn't have enough quotes to go around for everything, and i really need to figure out how to do this with the same style with just editing the a href with an onClick command.
I'v tried variouse javascrips but none of them seemed to work, after failing to do this I came to here and here I am asking for help.
If anything is unclear at all please ask.
Thx in advance!
echo "<a href='profile.php?id=$user_id'>":
Have you tried something like this?:
echo "<a href=\"profile.php?id=$user_id\" onclick=\"yourFunction('profile.php?id=$user_id','whatever');return false;\">": You can use double quotes as usual by escaping them with the backslash \ character, and use the single quotes for the Javascript function.