Newbie - please forgive my ignorance.I have an upload form and I want to put a default value in the filename input.Since file inputs have no associated value="xx" method, I tried the following JavaScript using the DOM defaultValue property. I added a text input (test1) to verify that the script is executed. IE-6 correctly puts "abc" in the test1 box, but doesn't modify the file box or pass the defaultValue ("c:\test1.txt") to my PHP CGI file.Mozilla 1.7.8 doesn't appear to do anything at all.Is there something wrong with my approach or another method that would work?Thanks,John
<html><head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <meta http-equiv="PRAGMA" content="NO-CACHE"><title>Upload</title><script type="text/javascript">function setDefaults(){document.getElementById("test1").value="abc"document.getElementById("userfile").defaultValue="c:\test1.txt"}</script></head><body onload="setDefaults()"><form enctype="multipart/form-data" action="test_upload.php" method="post"><input type="hidden" name="MAX_FILE_SIZE" value="1000000"><input name="test1" type="text">File to send: <input name="userfile" type="file" size="50"><br><br><input type="submit" value="Send File"></form></body></html>