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.
I'm building a jQuery UI Dialog for the first time using the following line of code:
$("#demo").text('Are you sure ?').dialog({width: 250});
But attaching the dialog to an html element is causing problems. All I want is a confirmation dialog box independent of the page html. Is this even possible with jQuery UI ? Thank you all in advance.