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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:09:13+00:00 2026-05-29T04:09:13+00:00

Learning jquery, so please be kind :) Using PHP, I have a table with

  • 0

Learning jquery, so please be kind 🙂

Using PHP, I have a table with many (let’s say 50) rows – each with a product ID and a product Description, and then a variety of other fields that differ line to line depending on the type of product.

My approach is to have one form for each of the 50 products (each uniquely named using the product ID) and be able to submit the particular form and fields in that form using a button without having to write a different jquery function for each product/form.

Have been googling for god knows how long, and I must be asking wrong, as I can’t find anything that accomplishes what this pseudo code would do:

<form name='frm_for_product_123'>
   <input type="hidden" name="product_id" id="product_id" value="123">
   <input type="text" name="description" id="description" value="blah blah blah for 123">
   <input type="text" name="color" id="color" value="blue">
   <input type="text" name="size" id="size" value="medium">
   <input type="button" value="Apply">
</form>

<form name='frm_for_product_456'>
   <input type="hidden" name="product_id" id="product_id" value="456">
   <input type="text" name="description" id="description" value="blah blah blah for 456">
   <input type="text" name="weight" id="weight" value="heavy">
   <input type="button" value="Apply">
</form>

etc., etc. etc. for all 50 products

I want the user to be able to click on the Apply button for that row, and have the values OF that row go to a single, general function that will post that form and do the update.

  • 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-05-29T04:09:14+00:00Added an answer on May 29, 2026 at 4:09 am

    I’m assuming from your question you want to submit via Ajax. Not entirely clear if that’s the case, but here’s an example of how to do it with jQuery:

    $('form').submit(
        function (e) {
            // stop form submission
            e.preventDefault();
            // do any custom logic here
                // then submit - $(this) = current form, 
                // .serialize() turns the form into post data
            $.post('form processing url', $(this).serialize(), myCallbackUpdateFunction);
        }
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm learning JQuery and have found the factory function $() with its selectors quite
I am learning JQuery, and I have ran into an odd issue. I made
I have just started learning Jquery and am new to writing javascript (I am
I'm learning jQuery and am about to write some pages using intensively that library.
i found http://visualjquery.com/ more useful when i was learning jQuery with each function explained
I am learning JQuery, and I have checked out that JQUery has got a
I am new to Jquery and in learning phase. I have written a test
I have been using the jQuery nyroModal plugin for a little bit of time,
I am learning jQuery and have a created several plug ins. Unfortunately due to
I am learning jQuery. Could someone please explain what the difference between the window.onload

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.