• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

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.
 
I didn't do it. You can't prove it. Nobody saw me. The sheep are lying! This tiny ad is my witness!
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic