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

  • SEARCH
  • Home
  • 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 7840611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:50:44+00:00 2026-06-02T15:50:44+00:00

I have the following form: <form enctype=multipart/form-data action=uploader.php method=POST> <input name=uploadedfile type=file /> </form>

  • 0

I have the following form:

<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input name="uploadedfile" type="file" />
</form>

Once a user has clicked the uploadedfile input and selected a file, they then can click this button on a different area of the page:

<a id="button">My button</a>

How can clicking My button, how can it trigger the upload of the form? Important: cannot be within the form and can’t be an input element. This must also be an ajax style operation with no reloading of the page if possible.

  • 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-02T15:50:45+00:00Added an answer on June 2, 2026 at 3:50 pm

    You can give the form an ID (or use one of the many variations to select the form):

    <form id="myForm" [...] >
    

    and with jQuery submit the form:

    $('#myForm').submit();
    

    You’ll want the submit functionality to be within a click event of the button:

    $('#button').click(function(){
        $('#myForm').submit();
    });
    

    Update

    To submit your form using ajax you can do the following:

    $('#button').click(function(){
          var form = $('#myForm');
            $.ajax({
              url: form.attr('action').val()  ,
              type: 'POST' ,
              data: form.serialize()
            });
        });
    

    If you’re uploading files as it seems you might be, you might want to look at one of the following jQuery plugins:

    • jQuery Ajax File Upload Plugin
    • Multiple File Upload Plugin
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following html code : <form name=uploadForm action= method=POST enctype=multipart/form-data> <input type=file
I have the following form <form name=myForm id=myForm method=post enctype=multipart/form-data action=script.php> and this jQuery
I have this form: <form action=image_upload.php method=post enctype=multipart/form-data> Image 1: <input type=file name=event_image />
I have the following form: <form id=vintro-upload-form action={url}?nexturl={nextUrl} method=post enctype=multipart/form-data > <input name=file type=file/>
If I have a html form like the following: <form name=statusForm action=post.php method=post enctype=multipart/form-data>
I have the following form <form id=upload method=post EncType=Multipart/Form-Data action=reciver.aspx> <input type=file id=upload name=upload
<form action=http://s0.filesonic.com/abc method=post enctype=multipart/form-data> <input type=file name=files[] /> <button type=submit>submit</button> </form> The above code
I have the following form: <html> <body> <form action=upload_file.php method=post enctype=multipart/form-data> <label for=file>Filename:</label> <input
I have the following form on an .NET MVC View: <form method=post enctype=multipart/form-data action=/Video/UploadDocument>
I have a form to upload image like below <form name=sample enctype=multipart/form-data action=index.php method=post

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.