How to start uploading file just after been selected

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Abubakr
    New Member
    • Nov 2010
    • 3

    #1

    How to start uploading file just after been selected

    I want my script to start uploading files just after been selected. Like in the E-mail attachment. I think java script can do this. Can anybody tell me how??

    Thanks in advance.
  • Cmaza
    New Member
    • May 2007
    • 16

    #2
    Adding this as a parameter to your file input tag should do the trick:

    onchange="javas cript:{document .FormName.submi t();}"

    (Changing 'FormName' to the name of the form uploading the file.)

    Depending on the structure of your website, what other inputs may or may not be present within your form and what sort of validation methods you are using, you may wish to modify or expand on what I've suggested above. However, functionally, it should work.

    Hope this helps. :)

    Comment

    • Abubakr
      New Member
      • Nov 2010
      • 3

      #3
      Thank you a lot Cmaza.

      Comment

      Working...