I am having problems refreshing an image in a dialog box. If I move the div outside of the dialog box, it works fine with this:
var img = db_cgi_url + "/photo.cgi?do=view;ID=" + ID + ";" + now.getTime(); $("#myImage").attr("src", img); Unfortunately, this does not work when the div is inside the dialog box, no matter if I move the code after the "open" command or in the "open" callback function. Any suggestions? function edit_thumb() { $("#imageDialog").dialog('destroy'); $("#imageDialog").dialog({ autoOpen: false, closeOnEscape: true, resizable: true, height: 'auto', width: 'auto', buttons: { 'Edit Thumb': function() { $("#imageDialog").submit(); }, Cancel: function() { $(this).dialog('close'); } }, close: function() { }, open: function() { var img = db_cgi_url + "/photo.cgi?do=view;ID=" + ID + ";" + now.getTime(); $("#myImage").attr("src", img); } }); $("#imageDialog").dialog('open'); return false; }