1
kaotik
Javascript and php, passing variables
  • 2004/10/15 3:09

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


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!

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits