You're using jquery or some other framework - not how you noted your question, but,
Here, in
real javaScript, is a method:
For this example:
First, let the user name be in the variable uid
Let your message be in variable msg
Then the script would display the message as
alert(uid + ': ' + msg);
However - since you couldn't work it out yourself and yet you had code with sophistication at an arguably higher level than appending two strings in javaScript I'd say you just copied the code from somewhere and are quite clueless. I've given you the pieces, but you'll need to assemble them yourself inside your code - trivial if I'm wrong about you.