1
Hi, I have a some code that uploads a file through a form in a popup window. The uploading part works. Now what I want is to show the name of the file uploaded in the original window.
Here's the javascript from the original window
le="color: #000000"><?php echo "<script language="javascript">n" ."function open_w(file) {n" ." newwin = window.open(file,'Attachments','width=300, height=200, left=200, top=150, scrollbars=no, toolbar=no');n" ."}n" ."n" ."function attachfiles(files,types) {n" ." window.document.all.Atts.innerText = files;n" ." document.emailform.attachment.value = files;n" ." document.emailform.attchtype.value = types;n" ."n" ."</script>n";
And here's the form from the popup window:
le="color: #000000"><?php echo "<form name="emailform" id="upload" ENCTYPE="multipart/form-data" method="post"><p>" ."<input type="file" id="userfile" name="userfile">" ."<input type="submit" name="upload" value="Upload"></p>" ."<p><input type="submit" name="submit" onClick="window.close()" value="Close"></p></form>";
Please help!