in the html file * note js sets the value of path, and that is seen in the output attached to the basename of the uploaded file, so that's intact.
and in the script file var success = $success; function closemsg() { parent.dialog_uploaded(); } function errormsg() { parent.dialog_upload_failed(); } if (success) { closemsg(); } else { errormsg(); } EOT; ?>