Firstly, please don't multi-post. There's no reason to send the same
message twice, just with a different subject.
Laermans_k wrote:
Does anyone have a solution to use the <input type="file"
id="filechooser"> and the <input type="submit" id="submitbutton"> in 1
button click?
It's not possible to simulate a click on the file upload control when a
user clicks submit, but you may be able to add an onchange event
listener to the file upload control, which automatcially submits when
the user selects a file. However, this would be a very bad user
interface for the following reasons:
1. It changes the expected behaviour of the control
2. If a user selects the wrong file by mistake, it does not give the
user a chance to change their mind before submitting.
3. Using onchange may not allow a user to manually type in a file path,
as the form may submit as soon as they start typing. Although, this
depends upon when the change event is fired by the user agent.
If you plan to go ahead with this regardless, I suggest you ask in a
javascript related group.
--
Lachlan Hunt
http://lachy.id.au/ http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox