472,954 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,954 software developers and data experts.

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.

Jul 23 '05 #1
5 5408
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" <rb******@magma.ca> wrote in message
news:yp********************@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.

Jul 23 '05 #2
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.

rb******@magma.ca
Jul 23 '05 #3
I was so excited to find what I was looking for, I forgot my manners.

Thank you very much,
Ron.

Jul 23 '05 #4
Dominique,

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

Ron.

"Dominique" <ni****@webadstudio.com> wrote in message
news:c7**********@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" <rb******@magma.ca> wrote in message
news:yp********************@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.


Jul 23 '05 #5
JRS: In article <Wr********************@magma.ca>, seen in
news:comp.lang.javascript, Ron Brennan <rb******@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" <ni****@webadstudio.com> wrote in message
news:c7**********@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)
Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Victor A. Cuya | last post by:
Hello all, I have been trying to solve an annoying behavior with PHP (I think). Maybe some of you have encountered the same and have some ideas. I have an html form and I use an <input...
2
by: Ron Brennan | last post by:
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...
0
by: bart plessers | last post by:
Hello, Somewhere in my code I have <input TYPE="button" NAME="btnFirst" VALUE="<<" OnClick="GetFile('1')" DISABLED> I changed the layout of the INPUT with a stylesheet to INPUT { color:...
2
by: Macca | last post by:
Hi, I would like to have some buttons on a dialog i am designing that look like hyper links but in fact will open up a further dialog rather than do web stuff. Can anyone tell me how i can do...
3
by: oopaevah | last post by:
I want to have a separate button which invokes the "browse" button on an input type=file. In internet explorer the following code works ok, in firefox nothing happens. All I do is call click()...
9
by: Prakash Singh Bhakuni | last post by:
am replacing the default "Browse..." button for input type=file. This works fine except that the form will only submit after the SUBMIT button is clicked twice. Any ideas on why this is happening...
1
by: reshmaah | last post by:
hello, i would like to access values selected by user on form, from multiple list,i mean, from field <select multiple name=color> how can i acheive it.
2
by: pandurusankar | last post by:
Hi, Need a pointer for managing File type button in HTML page, i am able to handle all the components in HTML using IEAutomation module like: text box, links, radio button, list box etc. but i...
1
by: sandeep kumar shah | last post by:
Hi, We have used a file uploading HTML tag in an HTML page. We need to customize the text displayed on the Button (which is by default “Browse…” for internet explorer). Below is the...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.