Changeset 4486


Ignore:
Timestamp:
Sep 8, 2008, 8:58:19 AM (13 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1109: Plot tool doesn't display "Generating plot..." correctly in IE

Location:
trunk/www/views/experiments/plotter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/views/experiments/plotter/index.jsp

    r4476 r4486  
    361361      image.src = getRoot()+'images/plot_generating.gif';
    362362      // Otherwise, the browser refuses to display the 'plot_generating.gif' while we are waiting.
    363       setTimeout('changePreviewImage()', 100);
     363      //setTimeout('changePreviewImage()', 100);
     364      image.realImg = new Image();
     365      image.realImg.onload = changePreviewImage;
     366      image.realImg.src = url;
    364367    }
    365368  }
     
    367370  function changePreviewImage()
    368371  {
    369     var url = generatePlotUrl(false);
    370     if (url)
    371     {
    372       document.getElementById('preview').src = url;
    373     }
     372    var image = document.getElementById('preview');
     373    image.src = image.realImg.src;
     374    image.realImg = null;
    374375  }
    375376 
  • trunk/www/views/experiments/plotter/view.jsp

    r4476 r4486  
    4646    var url = window.opener.generatePlotUrl(true);
    4747    var img = document.getElementById('plot');
    48     img.src = url;
     48    img.realImg = new Image();
     49    img.realImg.onload = switchImage;
     50    img.realImg.src = url;
     51  }
     52  function switchImage()
     53  {
     54    var img = document.getElementById('plot');
     55    img.src = img.realImg.src;
    4956  }
    5057  </script>
Note: See TracChangeset for help on using the changeset viewer.