Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8292919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:38:56+00:00 2026-06-08T13:38:56+00:00

I have a form which includes filefield to upload some files. Sometimes what happens

  • 0

I have a form which includes filefield to upload some files.
Sometimes what happens is at first, I select one file from browse to upload but then i realize i do not want to upload it anymore.How can i make it empty again??
Is it like that once this field is filled it cannot be reverted back to empty??

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T13:38:58+00:00Added an answer on June 8, 2026 at 1:38 pm

    This can be accomplished with javascript.

    Quoting Clear upload file input field with jQuery post from electrictoolbox.com:

    function reset_html(id) {
    $(‘#’+id).html($(‘#’+id).html()); }

    $(document).ready(function() {

    var file_input_index = 0;
    $('input[type=file]').each(function() {
        file_input_index++;
        $(this).wrap('<div id="file_input_container_'+
                      file_input_index+'"></div>');
        $(this).after('<input type="button" value="Clear" 
                       onclick="reset_html(\'file_input_container_'+
                                             file_input_index+'\')"
                       />');
    });
    

    });

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form which includes 3 textfields so users can upload files. They
i have an form which will send some data to an php file ,
I have a PHP form which includes a file being uploaded upon submit. As
I have a HTML form, which includes radio buttons that the user can select
I have a form which includes a data sheet. I would like to make
I have a simple Ruby on Rails form which includes an authenticity_token. Unfortunatly, I
Hi I have a visual studio project which includes postbuildevents in the following form:
I have a form which includes a JQUERY datepicker attatched to an <input> on
I have a form which spawns from an excel add-in written with VSTO. I
I have a javascript function to clear my form which includes a gridview, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.