Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   Coloring input type=input browse button; uploading multiple files (http://www.velocityreviews.com/forums/t877267-coloring-input-type-input-browse-button-uploading-multiple-files.html)

Ron Brennan 05-10-2004 09:35 PM

Coloring input type=input browse button; uploading multiple files
 
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.




Dominique 05-11-2004 02:06 PM

Re: Coloring input type=input browse button; uploading multiple files
 
1) You cannot change the button that is displayed next to the input field,
BUT
what you can do is put it in a <DIV> or <SPAN> and clip the button
off --> style= width:XXpx;overlow:hidden blah blah...

2) Invoking the browse dialog can be done by calling the "click()" event on
that field
--> <button onclick="fileBrowse.click()">click here</button> where
"fileBrowse" is the name of that field...
3) You cannot place a value into that field, because the browse control
needs to specifically get the file info loaded into that form field
(fileBrowse i mean),
BUT, you CAN read the value that is placed in that field after the user
browses and selects their file...SO
you CAN then take that value and place it wherever, in a textarea or list or
whatever...but UNDERSTAND that you cannot do anything with that...

4) As for mutliple file uploading... :0)
option 1: Dynamically create a new input field
option 2: Show a max of 10 fields(although this wastes space...)

5) if you go for option 1 (i hope)
it mean you show eg. <input type="file" name="file_1">
if the user has selected his file you extract the value from -->
document.formname.file_1.value and put it in your list.
The hide that box as is, and create a new one
aaaargh....

mail me if you want this code,
too much to explain...need coffee, but a brilliant idea for uploading
mutliple files tho!!

thanks!

Dominique


"Ron Brennan" <rbrennan@magma.ca> wrote in message
news:ypSdnepAEr08aALdRVn-uw@magma.ca...
> 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.
>
>
>




Ron Brennan 05-11-2004 09:39 PM

Re: Coloring input type=input browse button; uploading multiple files
 

> 1) You cannot change the button that is displayed next to the input field,
> BUT
> what you can do is put it in a <DIV> or <SPAN> and clip the button
> off --> style= width:XXpx;overlow:hidden blah blah...
>
> 2) Invoking the browse dialog can be done by calling the "click()" event

on
> that field
> --> <button onclick="fileBrowse.click()">click here</button> where
> "fileBrowse" is the name of that field...
> 3) You cannot place a value into that field, because the browse control
> needs to specifically get the file info loaded into that form field
> (fileBrowse i mean),
> BUT, you CAN read the value that is placed in that field after the user
> browses and selects their file...SO
> you CAN then take that value and place it wherever, in a textarea or list

or
> whatever...but UNDERSTAND that you cannot do anything with that...

-----------------------------
I've been trying this approach, and haven't gotten it to work for me. I
think it might work for pre-IE 5, but not later. I'll see if there is a
nuance in your code that's different than from mine


-----------------------------
> 4) As for mutliple file uploading... :0)
> option 1: Dynamically create a new input field
> option 2: Show a max of 10 fields(although this wastes space...)
>
> 5) if you go for option 1 (i hope)
> it mean you show eg. <input type="file" name="file_1">
> if the user has selected his file you extract the value from -->
> document.formname.file_1.value and put it in your list.
> The hide that box as is, and create a new one
> aaaargh....
>
> mail me if you want this code,

--------------------------------
Yes, please, please send me the code for option 1. It's exactly what I want
to do.

rbrennan@magma.ca



Ron Brennan 05-11-2004 09:41 PM

I forgot to say thank you.
 
I was so excited to find what I was looking for, I forgot my manners.

Thank you very much,
Ron.




Ron Brennan 05-14-2004 01:05 AM

Re: Coloring input type=input browse button; uploading multiple files
 
Dominique,

My e-mail to you this evening bounced back becuase you've exceeded your
e-mail capacity.

Ron.



"Dominique" <niques@webadstudio.com> wrote in message
news:c7qmk0$361$1@ctb-nnrp2.saix.net...
> 1) You cannot change the button that is displayed next to the input field,
> BUT
> what you can do is put it in a <DIV> or <SPAN> and clip the button
> off --> style= width:XXpx;overlow:hidden blah blah...
>
> 2) Invoking the browse dialog can be done by calling the "click()" event

on
> that field
> --> <button onclick="fileBrowse.click()">click here</button> where
> "fileBrowse" is the name of that field...
> 3) You cannot place a value into that field, because the browse control
> needs to specifically get the file info loaded into that form field
> (fileBrowse i mean),
> BUT, you CAN read the value that is placed in that field after the user
> browses and selects their file...SO
> you CAN then take that value and place it wherever, in a textarea or list

or
> whatever...but UNDERSTAND that you cannot do anything with that...
>
> 4) As for mutliple file uploading... :0)
> option 1: Dynamically create a new input field
> option 2: Show a max of 10 fields(although this wastes space...)
>
> 5) if you go for option 1 (i hope)
> it mean you show eg. <input type="file" name="file_1">
> if the user has selected his file you extract the value from -->
> document.formname.file_1.value and put it in your list.
> The hide that box as is, and create a new one
> aaaargh....
>
> mail me if you want this code,
> too much to explain...need coffee, but a brilliant idea for uploading
> mutliple files tho!!
>
> thanks!
>
> Dominique
>
>
> "Ron Brennan" <rbrennan@magma.ca> wrote in message
> news:ypSdnepAEr08aALdRVn-uw@magma.ca...
> > 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.
> >
> >
> >

>
>




Dr John Stockton 05-14-2004 08:13 PM

Re: Coloring input type=input browse button; uploading multiple files
 
JRS: In article <Wridnes6oo3ehjndRVn-tw@magma.ca>, seen in
news:comp.lang.javascript, Ron Brennan <rbrennan@magma.ca> posted at
Thu, 13 May 2004 21:05:07 :

>Lines: 82


>
>Dominique,
>
>My e-mail to you this evening bounced back becuase you've exceeded your
>e-mail capacity.
>
>Ron.
>
>
>
>"Dominique" <niques@webadstudio.com> wrote in message
>news:c7qmk0$361$1@ctb-nnrp2.saix.net...
>> ... ...


Which should help to remind you not to quote the whole of a previous
message, which wastes everyone's resources. FAQ 2.3 para 6, FYI28.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)


All times are GMT. The time now is 04:19 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.