wood burning stoves 2.0
The moose likes HTML, CSS and JavaScript and the fly likes input type=file question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "input type=file question" Watch "input type=file question" New topic

input type=file question

Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256

I was just wondering what exactly happens when you click the browse button of input type=file??
i mean what event gets called.
is it possible to call this browse buttons click from some other elements onClick??

because the requirement is to implement the browse functionality without the browse button and the text box being displayed.

So please help out in explaining what happens when you click on the browse button and can it be trapped?

Life called,so here I am.<br />Cheers<br />Niki.:-)
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
The file selection dialog is part of the file input type; it can not be separated from it. What good is selecting a file if you have no way of storing which file has been selected?
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
my requirement here is different.
i need to do what i have mentioned in my last post.
so is there a way?

and can anyone explain what happens when you click the Browse button? i mean whats the event that is fired? can it be fired from somewhere else?
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
The file input has very high security restrictions on it since it can do some damage to your system by uploading sensitive documents.

Add event handlers to the tag and see what fires. Only suggestion I have.

Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
ok based on the previous posts another question.
how do i call some elements onclick from some other element?

input type=button name=a on click="some function"

input type=button name=b on click="call a's onclick"

note that i dont want to call the function i want to call the event.
I agree. Here's the link: http://aspose.com/file-tools
subject: input type=file question
It's not a secret anymore!