Actually I just found that I have the same problem with text inside a
<div>
if I put this in the open function with this div located in my dialog,
$("#changethisdiv").html("it is changed at" + new Date().getTime());
It will work one time, then it will no longer change after each time
it is opened...?
On Feb 11, 10:28 pm, jdgamble555 <[email protected]> wrote:
> 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;
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -