jQuery Message Box
<p>I have a list page with multiple users listed (a favorites list for the logged in users). There is a message button which opens up an overlay. The user can then send a message across using the message box in the overlay. The jQuery code is:</p>

<pre><code>$('#message').click(function(){
  var str = $(this).attr('name');
  var n=str.split("####");

  $('#user_new').val(n[0]);
  $('#msgto_username').html(n[1]);
  $('#bodybg').show();
  $('.confirmBox').fadeIn();
  return false;
});
</code></pre>

<p>However, only the first entry in the list manages to display the message box, for other entries the page just refreshes. The message button HTML is:</p>

<pre><code>&lt;a href="" id="message" class="btn" name="&lt;?php echo $user['userid'] .'####'. ucfirst($user['name']) ." ". ucfirst($user['first_name']." ".$user['last_name']); ?&gt;" title="&lt;?php echo 'Send message to ' . ucfirst($user['name']) ." ". ucfirst($user['first_name']." ".$user['last_name']); ?&gt;"&gt;Message&lt;/a&gt;
</code></pre>
