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 8552781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:30:08+00:00 2026-06-11T14:30:08+00:00

I have the below form that i want to remove the submit button from

  • 0

I have the below form that i want to remove the submit button from (or hide it).

<form action="cart.php" method="post">
<input name="quantity" type="text" value="3" size="1" maxlength="2" />
<input name="adjustBtn" type="submit" value="change" />
<input name="item_to_adjust" type="hidden" value="1" />
</form>

In a jQuery file called test.js that i have included in the page i have the bellow that should submit the form when the input field “quantity” has changed, but it does not, i cannot get it to work and i have tried all sorts of form submit functions from other posts on SO. One person even said that if the submit button had a name of submit it would not work but i do not have that.

$(document).ready( function() {

    $('#quantity').change(function(){
       //$(this).closest("form").submit(); <-- commented out as not working either.
       //$(this).closest('form')[0].submit(); <-- commented out as not working either.
       $('#adjustBtn').submit();
    });

} );

Anyone have any idea why it wont submit the form? I have tested in chrome and IE.

  • 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-11T14:30:10+00:00Added an answer on June 11, 2026 at 2:30 pm

    You need to submit the form instead of the button:

    $("#adjustBtn").closest("form").submit();
    

    Also, you didn’t give an id to your adjustBtn, thus $("#adjustBtn") won’t work;

    <input id="adjustBtn" name="adjustBtn" type="submit" value="change" />
    

    The same thing happens with #quantity, that’s why the change handler doesn’t get fired, you need to also add the id:

    <input id="quantity" name="quantity" type="text" value="3" size="1" maxlength="2" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a variable that contains an array from form data, seen below: $option1
I have an Ajax form that lets me dynamically remove rows from a table
I have the code below on form so that the user submits the form
I have below html code in one of the opensource project. <form action=/wiki/bin/view/Main/Search> <div
I have a real basic form (code below) with a bunch of back-panel PhP.
I have a simple form that I want to validate using blur if the
In ASP.NET MVC, I have a main standard form that posts to an action,
I have a web form that uses AD to authenticate users. I want to
I have a base class DockedToolWindow : Form, and many classes that derive from
I have a legacy PHP form that I'm moving over to Drupal 6. I'm

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.