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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:49:12+00:00 2026-06-08T12:49:12+00:00

need a little help. My jQuery was going smooth today until I hit a

  • 0

need a little help. My jQuery was going smooth today until I hit a wall. I am trying to have multiple forms (individual line items) editable on the fly via AJAX, with a text submission link or some kind of submit button. Problem is, I can get it to submit the form via the AJAX, but without any of the data from the form… i.e. hit submit, it sends the request, but no querystring. Can someone please help me identify what’s missing?

Here is my jquery:

        $('.submitLineChanges').click(function() {
            var formID = $(this).closest('form').attr('ID')
            datastring = $(formID).serialize();
            $.ajax({
                    type:'POST', 
                    url: 'update_ajax.asp', 
                    data: datastring,
                    success: function(response) {
                        alert("Success " + id)
                    //$('#ContactForm').find('.form_result').html(response);
                }//end ajax options
            });//end ajax
            return false;
        });//end of click function

And my form:

    <form id="line-item-<%= intRecID %>-form" class="submitLineForm">
        <input type="hidden" name="UpdateLineItem" value="true" />
        <span class="edit" id="edit-line-<%= intRecID %>" style="display: none;">
            <span class="quantity"><input name="part_qty" id="part_qty_<%= intRecID %>" type="text" value="<%=FormatNumber(rs("quote_part_qty"),0)%>"></span>
            <span class="partno"><input name="part_no" id="part_no_<%= intRecID %>" type="text" value="<%=rs("quote_part_id")%>"></span>
            <span class="descrip"><Textarea name="part_descrip" type="text" id="descrip<%= intRecID %>" rows="3"><%=rs("quote_part_descrip")%></Textarea></span>
            <span class="sellprice">$<input name="part_sale" id="part_sale_<%= intRecID %>" type="text" value="<%=FormatNumber(rs("quote_part_sale"),2)%>"></span>
            <span class="margin" id="emargin_<%= intRecID %>"><%=margin%></span>
            <span class="cost"><strong>Cost: </strong>$<input name="part_cost" id="part_cost_<%= intRecID %>" type="text" value="<%=FormatNumber(cost,2)%>"></span>
            <span class="wt"><strong>Weight: </strong><input name="part_wt" id="part_wt_<%= intRecID %>" type="text" value="<%=FormatNumber(rs("quote_part_wt"),2)%>"></span>
            <span class="update"><input type="button"  value="Save Changes" class="submitLineChanges" /></span>
        </span>
    </form>

As you should be able to tell, I’m running this in ASP. The form is for each line item in a cart basically. Because of the nature of the page, I don’t want to have a separate page to edit all the info. It seems this should work, but its likely I’m missing something through the tunnel vision I’m in now.

I should note, the form is for each line, I don’t need it to submit all the forms, just the one.

Thanks

  • 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-08T12:49:14+00:00Added an answer on June 8, 2026 at 12:49 pm

    Change

    datastring = $(formID).serialize();
    

    to

    var datastring = $('#' + formID).serialize();
    

    You need to use a # prefix using the ID selector. Also – without the var keyword you polluting the global namespace for no reason.

    Or even better … you could replace

    var formID = $(this).closest('form').attr('ID');
    var datastring = $('#' + formID).serialize();
    

    with

    var datastring = $(this).closest('form').serialize(); 
    

    Which finds the form and serialises it all in one go !!

    Thanks to @MikeBrant for that suggestion.

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

Sidebar

Related Questions

Little help need with jquery sortable. I have a nested list like so: <div
Need a little help with what I'm sure is fairly easy jquery I have
I have some JQuery that isn't working and I need a little help. I
I am using the gmap3 jquery plugin and need a little help. I have
Need a little help with my jquery here I want all my button with
I would need little help here. I'm trying to get the git respository from
Need a little help with a SQL / ActiveRecord query. Let's say I have
I need a little help with an if statement in php. I'm trying to
I need a little help here please.What am trying to do is pull all
Need a little help again. Say I have an unordered list, and I want

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.