Code:
<script type="text/javascript"> <!-- function preview(b){ bild = new Image; bild.src = b; if(document.all) document.all.vorschaubild.src = bild.src; if(document.getElementById || document.layers) document.getElementsByName('vorschaubild')[0].src = bild.src; } //document.test.parent.value = top.opener; //alert("top.opener: " + top.opener.location.href); //top.opener.window.test(); //--> </script> <form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST"> Bild: <input type="hidden" name="MAX_FILE_SIZE" value="50000"><input type="file" name="userfile" onchange="preview(this.value)"> <br /> <br /> <input type="submit" name="submit" value="Bild speichern"> <br /> <br /> <u>Vorschau:</u><br /> <div style="margin-left: 30px"><img src="spacer.gif" alt="" border="1" name="vorschaubild" height="50px" width="50px"></div> </form>
btw: dieses script darf jeder verwenden, wenn er es braucht
EDIT:
updated, but still not working
Kommentar