Okay, so I've gotten this far in modifying the jQueryUI dialog widget. I'm using it as a messaging service for members. What I've done so far is for the widget to carry over values of both the Real Name and the username of the recipient. The only thing left to do is to carry over the value of the userid in a kind of thing. You can all have a look at the jsfiddle. http://jsfiddle.net/pzByS/
[EDIT] I fixed the jsfiddle. The usernames are links to the profile. It would say,
<td class="realname">John Smith</td>
<td class="username"><a href=profile.php?uid=123>johnsmith</a></td>
<td><a href="#" class="opener">Send Message</a></td>
which will differ for every member. How should go in terms of passing the uid value to a hidden input value in the form for the dialog widget?