SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Sep 2011
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation input file -> onbrowse?

    Hi ,

    I want to pop up alert when the user browse file into input
    for example i have this input

    HTML Code:
    <input type="file" name="myfiles[]" />
    now , when the user finish to browse an file i want a function to start working ,
    what i mean by finish browse file is when the user select file and than click on the file he selected twice and than when the browsing files windows close i want this function to start
    how to do that?

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by morplug View Post
    when the user finish to browse an file i want a function to start working ,
    what i mean by finish browse file is when the user select file and than click on the file he selected twice and than when the browsing files windows close i want this function to start
    how to do that?
    There is no event for that, but what you could do is to start a setInterval event that polls the filename value. When the filename changes, you can cancel the setInterval event and trigger function that you want to start working.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member
    Join Date
    Sep 2011
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you give me example? and is there maybe an other way?

  4. #4
    SitePoint Member
    Join Date
    Sep 2011
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i got this.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •