Variable and div in place of selector

Variable and div in place of selector

Dear everyone, 

I've been using jQuery UI Dialog to setup confirmation messages as follows:

    $('<p> Are you sure you want to remove user XX from your contact list? </p>').dialog({

    But now I need to be able to display the real name of the user instead of "XX". I have this example variable :

    var name = 'John' ;

    that I need to insert it in place of "XX". Later on, I will pass variables from my Drupal module, but I need first to know how to insert the variable "name" in place of "XX". Can someone help me please. Thank you very much in advance.