Witajcie,

Mam taki kodzik:

  1. <form name="newUserPhotoForm" target="CropWindow" onsubmit="window.open('about:blank','CropWindow', 'width=800,height=600,scrollbars=yes,status=no'); return true;" action="PhotoCrop.php" enctype="multipart/form-data" method="post">
  2. <input type="file" name="file"/>
  3. <input type="submit" name="upload" value="Zmień" /><br />
  4. <img id="newUserPhoto" src="../photo/blank.gif"/><br />
  5. <input type="text" name="tmpUploadedFileName"/>
  6. <input type="hidden" name="MAX_FILE_SIZE" value="500000" />
  7. </form>


  1. <?php
  2. function aaa(tmpFileName){
  3.        tmpFilePath = '../photo/photo_tmp/' + tmpFileName;
  4.    window.opener.document.newUserPhotoForm.tmpUploadedFileName.value = tmpFilePath;
  5.        
  6.    var tmp = window.opener.document.getElementById('newUserPhoto');
  7.    tmp.setAttribute('src',tmpFilePath);
  8.                        
  9.    window.close();
  10.    return true;
  11. }
  12. ?>



W Firebugu na podglądzie widzę że ścieżka się zmieniła, ale w kodzie strony nadal jest src="../photo/blank.gif".
window.opener.location.reload(); też nie działa tak jakbym chciał - odświeża cała stronę i powoduje wyświetlenie blank.gif

Macie jakieś pomysły w jaki sposób wymusić odświeżenie zdjęcia??