| re: Coloring input type=file browse button; uploading mutiple files
There are serious restrictions on file input boxes. I don't think
you're allowed to make them invisible, write to the box from
javascript, or maybe even read from it anymore. The reason is then I
can "choose" a file on your system and upload it without you knowing
it. It's a slippery slope. You're probably better off either sticking
with what's "normal" or writing an ActiveX/Applet/Flash/etc code to do
what you need.
Mike
"Ron Brennan" <rbrennan@magma.ca> wrote in message news:<9dednXl9w-uwaALd4p2dnA@magma.ca>...[color=blue]
> Good afternoon.
>
> The entire task that I'm trying to achieve is to allow a user to browse and
> upload multiple files simultaneously, hiding the Browse button of <input>
> tags of type="file" and replacing it with a button of my own background
> color and text.
>
> The file paths I'd like displayed in a textarea and then the files uploaded
> at once.
>
> The code chunks toward my goal I got from the Web (below) I think worked
> before IE 5.0 but for me produces an "Access Denied" error.
>
> Can anybody help with any part of my problem (coloring the browse button,
> listing multiple chosen files in a textarea, uploading an artibrary number
> of files at once)?
>
> Thanks, Ron.
>
>
>
> ------- JavaScript -------------
> function addFile(path) {
> document.getElementById(\"picturesTextArea\").valu e = path;
> document.getElementById(\"text\").focus();
> return true;
> }
>
> ------ HTML ------------
> <td>
> <input
> type="file"
> id="pictureFile"
> name="pictureFile"
> style="display:none;"
> onpropertychange="if(event.propertyName=='value')
> {addFile(this.value);}">
> </input>");
> <textarea
> id="picturesTextArea"
> name="picturesTextArea"
> cols="75"
> rows="3"
> maxlength="200">
> </textarea>
> </td>");
> <td>
> <button type=\"button\"
> "onClick=\"this.form.pictureFile.click();\">
> AddPicture
> </button>
> </td>");[/color] |