Mam taki kodzik:
<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"> <input type="file" name="file"/> <input type="text" name="tmpUploadedFileName"/> <input type="hidden" name="MAX_FILE_SIZE" value="500000" /> </form>
<?php function aaa(tmpFileName){ tmpFilePath = '../photo/photo_tmp/' + tmpFileName; window.opener.document.newUserPhotoForm.tmpUploadedFileName.value = tmpFilePath; var tmp = window.opener.document.getElementById('newUserPhoto'); tmp.setAttribute('src',tmpFilePath); window.close(); return true; } ?>
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??