İşte benim ana sayfa kodu:
<form><iframe name="iframe_pic" src="iframe.html"></iframe></form>
İşte benim iframe.html olduğunu:
<script type="text/javascript">
function reset_imageform(){
f = document.getElementById("pic_form");
f.src=f.src;
}
</script>
</head>
<body><form name="pic_form" id="pic_form" enctype="multipart/form-data" method="post" action="bincgi/imageUpload.php"><input name="pic_file" type="file" id="pic_file" size="35" onChange="this.form.submit();"></form>
ve burada benim php dosya imageUpload.php bir kısmı:
$display_image="<img src='../temp_images/$newfilename'>";
$display_image.="<br><a style='font-weight:bold; font-size:12px;' href='#' onclick='window.parent.reset_imageform();'>remove picture</a>";
echo $display_image;
READ: As you can see I am trying to call javascript inside iframe.html to reset the form. This is because after all my php, the image shows, and I want the user to be able to click a link and then the form gets resetted and the user can chose another picture to upload.
Ben formu (pic_form) sıfırlamak gerekir ya ben 'pic_form' içeren tüm iframe (iframe_pic) yeniden gerekir? Herkes bilir ve herhangi bir kod, bunu nasıl duyacağız?
Teşekkürler