• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

input type=file question

 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

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?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Eric
 
Niki Nono
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bring me the box labeled "thinking cap" ... and then read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic