Forum Moderators: open
<form method="post" enctype="multipart/form-data">
<input type="file" name="file">
<input type="button" onclick="document.getElementById('file').click()" value="click me">
<input type="submit" value="Submit">
</form>
click button to select a file, it's ok.
but press Submit will clear file input, no submit
must press again will submit, but no file uploaded
almost same problem as [experts-exchange.com...]
but i need the real file uploaded
system: winxp sp2
browser: ie6 (come with sp2)
gmail js: works
my code: failed :(
any idea?
** just need cross frame **
file.click() must be done in another frame excluding the on "file" is in
should be IE security hole?
but gmail did so. and no check for failure.
doing .click() will not cause error, but after selected file, and access file.value, will cause.
i'd guess gmail's _CM_OnAttach() can catch and report the error, but wonder what gmail will do when ie suddently fix this hole.
my auto update installed the lastest hotfix for ie today, but still don't have this fixed
this trick (althought is a little dirty)
resolve problems styling the input file!
thanks so much.
u don't see the problem may because u don't have xpSP2 or u havn't tried
i know what i'm doing, i know how to get file uploaded without onclick javascript
u may try it with action="#*$!.php"
maybe u can find me a better workround to the problem
but whatever, thanks for your carefulness