problem updating image content inside a dialog box (image refresh)
I am trying to allow my image to be refreshed inside a dialog box. It is refreshed fine outside of a dialog box.
- function edit_thumb() {
- $("#imageThumbBox").dialog('destroy');
- $("#imageThumbBox").dialog({
- autoOpen: false,
- closeOnEscape: true,
- resizable: true,
- height: 'auto',
- width: 'auto',
- buttons: {
- 'Edit Thumb': function() {
- $("#myThumbForm").submit();
- },
- Cancel: function() {
- $(this).dialog('close');
- }
- },
- close: function() {
- },
- open: function() {
- }
- });
- var img = db_cgi_url + "/photo.cgi?do=view;ID=" + ID + ";" + new Date().getTime();
- $("#myimage").attr("src", img);
- $("#imageThumbBox").dialog('open');
- return false;
- }
I would like it so that everytime my function "edit_thumb" is ran, the dialog box and all the contents are refreshed, especially the image inside of it. As of now, it just loads the image and when I try and change it with lines 23-24. I get no such luck even when I move lines 23-24 inside line 20. Any suggestions?