I jsut checked the sample of jQuery UI that opens a dialog, it's strange that the message needs to be written in HTML and read it by jQuery selector:
http://jqueryui.com/demos/dialog/
<script>
$(function() {
$( "#dialog" ).dialog();
});
</script>
<div class="demo">
<div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
What I want to do is quite simple, I want the dialog to display a string defined as a js variable, like this:
var cmd_str = "abcdefg";
$(cmd_str).dialog();
But this doesn't seem to work well.