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
echo "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"
    
."n";


And here's the form from the popup window:
echo "emailform" id="upload" ENCTYPE="multipart/form-data" method="post">

"
    ."file" id="userfile" name="userfile">"
    
."submit" name="upload" value="Upload">

"
    
."

submit" name="submit" onClick="window.close()" value="Close">

"
;


Please help!

Login

Who's Online

332 user(s) are online (217 user(s) are browsing Support Forums)


Members: 0


Guests: 332


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits