0

I'm pretty sure this is a simple fix, but I don't see it:

foreach($rows as $row) {
		$result	.= "<li><a  href='"javascript:void(0)" onclick="javascript:chatWith('.$row->username.')">" .htmlspecialchars(getNameFormatOnline($row->name,$row->username,$ueConfig['name_format']))."</a></li>\n";
}

This is a list of online users; putting the username inside "javascript:chatWith('USERNAME_HERE')", to initiate a chat.

Thanks, James

Edited by jamesbarnhill: Adding a quotation mark...

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by CFROG
1

Have a closer look at your use of quotes.
Try this:

foreach($rows as $row) {
		$result	.= '<li><a  href="javascript:void(0)" onclick="javascript:chatWith('.$row->username.')">' .htmlspecialchars(getNameFormatOnline($row->name,$row->username,$ueConfig['name_format'])).'</a></li>\n';
}
Votes + Comments
Helpful
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.