I have set the target of the "pic_form" to a div (pic_target). The form (pic_form) and the div (pic_target) are both inside the same iframe (iframe_pic). Whatever I set the target to of the "pic_form", a new page pops up and there is my php script (imageUpload.php) output... WHY?
İş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 target="pic_target" 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><div id="pic_target" name="pic_target"></div>
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;
Teşekkürler
Eğer PHP dosyanın daha fazla ihtiyacı IF, söyle bana ...