cancel
Showing results for 
Search instead for 
Did you mean: 

OK, we have HTML5 / CSS guru's but do we have jQuery ones?

Anonymous
Not applicable

OK, we have HTML5 / CSS guru's but do we have jQuery ones?

Hi,
I thought it wouldn't do any harm to ask. I have a button on my web site that when click displays an <input> element for files. In order to select a file the user then of course needs to click the Browse button. Is there a way I can get round this by using jQuery to automatically display the File Selection dialog box for me when the user clicks my 'Upload' button?
In case this helps for control reasons the <input> element is not used inside of a form element.
4 REPLIES 4
Townman
Superuser
Superuser
Posts: 22,916
Thanks: 9,534
Fixes: 156
Registered: ‎22-08-2007

Re: OK, we have HTML5 / CSS guru's but do we have jQuery ones?

Mook,
Try this for starters.
You can often answer questions like this by just typing in the keywords in Google - for example, to find this I searched on "html javascript open file dialog"
Kevin

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

Anonymous
Not applicable

Re: OK, we have HTML5 / CSS guru's but do we have jQuery ones?

I can take a hint!
$('#upload input[type=file]').click() ;
Does the trick. 🙂
Townman
Superuser
Superuser
Posts: 22,916
Thanks: 9,534
Fixes: 156
Registered: ‎22-08-2007

Re: OK, we have HTML5 / CSS guru's but do we have jQuery ones?

There is a fine line between a "hint" and a guidance towards the source of answers  Wink Cheesy
I have found no end of answers to things I knew nothing about following the above approach.  Often you can find practical worked through solutions which you will not find in technical texts.
The big hint is on your other thread...

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

Anotherone
Champion
Posts: 19,107
Thanks: 457
Fixes: 21
Registered: ‎31-08-2007

Re: OK, we have HTML5 / CSS guru's but do we have jQuery ones?

Quote from: Townman
You can often answer questions like this by just typing in the keywords in Google - for example..............

You should also note that it can frequently lead you a lot of repeatedly misguided and misquoted information unless you bother to double/triple check the accuracy of any information that it may turn up