Thanks for your reply. At this point in development, I need to
justify changing our customer's wishes with a good reason. For this
reason, I'd like to know if it's possible to activate a file browse
input activity dynamically or not.
The customer is a national professional society, and requires that
people posting documents (done via the form I'm working on) agree to
their TOU. Their TOU statment is several paragraphs long; because of
this and aesthetic reasons, we decided to go against the modal dialog.
My research shows that overriding the browse button works in FF, IE
and Safari; these are the only browsers we test against or guarantee,
so if it doesn't work elsewhere, that's acceptable.
Probably a better way to do it would be to wait for the submit and
bring it there. A problem is that several documents can be attached
simultaneously (using the same input field), meaning a person may
browse for several documents and finally refuse the TOU, thus
potentially pissing them off.
Anyway, is the dynamic activation of a browse input possible? That's
what I really need to know now.
Thanks,
Walter
On Nov 1, 1:55*pm, David Mark <dmark.cins...@ gmail.comwrote:
On Nov 1, 4:42*pm, walter-goo...@easypeas .net wrote:
Hi,
I need to capture an event on a form file input button and present a
dialog before allowing the user to browse for a file. *(A customer
needs this in a CMS that I'm customizing for them.) *Capturing the
click is easy:
What is this dialog supposed to do? *Why do you feel you need to
present it just before the browser dialog?
<form>
* <input type="file" id="theButton" />
</form>
Actually, that is not a button.
function theFunction() {
* // do something
Showing a (non-standard) modal dialog is all you can do here. *(FF3
and IE4+ are the only agents I know of that support this.)
* return false;
Return the appropriate value based on the result of the modal dialog.
https://developer.mozilla.org/en/DOM...howModalDialog
}
document.getEle mentById("theBu tton").onclick = theFunction;
The irritating thing about this is it breaks the accompanying
textbox. *My host's "control panel" application does this, but then
they do a lot of stupid things.