2

Hi guys actually I want to call a function by clicking on open button of browse field of HTML.Is it possible,if yes then provide me information

1
  • Are you going to stop its behavior? Why not just make a button and label it 'browse'? : ) Commented May 24, 2011 at 9:10

2 Answers 2

4

No. The "Browse" button is not accessible via JS (neither is just the text field next to it).

File uploads fields are very restricted not only regarding JS access - you cannot even style them properly.

Sign up to request clarification or add additional context in comments.

2 Comments

When I click on browse button a window pop ups for selecting a file. I want to call an javascript function when some one click on "Open" button after selecting a file. Let me know if it is possible.
Try registering a change event on the input element.
0

Basically there is restriction on browse button, but there is a solution by "onchange" event to call another js function. And you can do as you want, e.g: gmail file upload attachment, and shows all uploaded files and you can deselect each of them, so these type of js operation can be perform by OnChange method.....

and there is a lot of example to do work with browse button.altering on type=file

1 Comment

@user762267, hey man you can call a javascript function by onChange event, if you want can give you example.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.