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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:25:14+00:00 2026-05-18T11:25:14+00:00

i’m trying to serialize a form by the id but it won’t serialize and

  • 0

i’m trying to serialize a form by the id but it won’t serialize and send the data.

code attached below.

    <script type="text/javascript">
<!--
$(function() {

 if($('#selectProductDialog').length == 0)
 {
  $('#page-content').after('<div id="selectProductDialog"></div>');
  $('#selectProductDialog').hide();
 }

 $("#ViewProduct").click(function(){
  $.post("products/view", "ProductID="+$(this).val(), function(data){
   $("#page-content").html(data);
  });
  return false;
 });

 $('#AddProductLine').click(function() {
  $.post("order/getitem", null, function(data){
   $("#selectProductDialog").html(data);
  });
  $("#selectProductDialog").dialog({ autoOpen: true, 
           hide: 'slide',
           show: 'slide', 
           title: 'Selected Product',
           close: function(event, ui) 
           { 
            $("#selectProductDialog").empty();
           }});
  return false;
 });

 $('#addItemDialogButton').live('click', function(event) {
  $.post("order/getitem", "ProductCode="+$("#ItemCode").val(), function(data){
   $("#selectProductDialog").html(data);
  });
  return false;
 });

 $('.selectProductID').live('click', function(event) {
  $.post("order/getitem", "ProductID="+$(this).val(), function(data){
   $("#orderItems tbody").append(data);
  });
  return false;
 });


 $('a.delete').live('click', function(event) {
  $(this).parent().parent().remove();
  return false;

 });

 $("#DueDate").datepicker({ altFormat: 'yy-mm-dd', dateFormat: 'dd-mm-yy', minDate: new Date() });

 $("#SaveNewOrderButton").click(function() {
  $.post("order/newin", $("#NewOrderForm").serialize(), function(data){
   $("#page-content").html(data);
  });
  return false;

 });

});

//-->
</script>

<div class="container_12">
 <div class="grid_12">
  <div class="box-header">New Inbound Order
   <span class="fr">
    <button id="SaveNewOrderButton" class="button small">save</button>
   </span>
  </div>

        <div class="box">
         <form id="NewOrderForm">
          <div class="container_12">
     <div class="grid_6">
            <div class="box-header">To:</div>
            <div class="box">
             <textarea id="ToAddress" rows="5" cols="50"></textarea>
            </div>
           </div>

           <div class="grid_6">
            <div class="box-header"></div>
            <div class="box">
             <div class="row">Customer Account: <select id="CustomerAccount"><option value="1">chemists</option></select></div>
             <div class="row">Order ID: </div>
             <div class="row">Date: <?= date("d-m-Y");?></div>
             <div class="row">Due Date: <input type="text" id="DueDate"></div>
             <div class="row">Customer Order Reference: <input type="text" id="COReference"></div>
            </div>
           </div>
          </div>
          <br class="cl" />


          <div class="box-header">Order Items

          <span class="fr">
           <button id="AddProductLine" class="button small">add</button>
          </span>

          </div>

          <div class="box table">
           <table id="orderItems">
           <thead>
           <tr><td width="15%">Product Code</td><td width="50%">Product Name</td><td width="15%">Qty</td><td width="15%">Location (pallet) - Quantity</td><td width="5%">remove</td></tr>
           </thead>
           <tbody>

           </tbody>
           </table>
          </div>
         </form>
   </div>
 </div>
</div>
<br class="cl" />

within tbody
i have a dialog box that fills the table with the following row

<tr class="Item"><td><input type="hidden" id="Pcode[]" value="2">TW-TT-8423</td><td>Something Big - Real Big - Item A</td><td><input type="text" id="Qty[]"></td><td><select id="Location[]"> <option value="1">AA3 - 20</option>
<option value="3">BA3 - 16</option>
<option value="8">AA1 (3) - 1032</option>
</select></td><td><a href="#" class="delete">X</a></td></tr>
  • 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-18T11:25:15+00:00Added an answer on May 18, 2026 at 11:25 am

    “serialize” works with the attribute “name”, must include the tags “input/select/textarea/…”

    exmaple for a comment:

    var data = "", limit = "";
    $('myForm').find('input').each(function(){
    
        data += limit + encodeURIComponent($(this)[0].id) + "=" + encodeURIComponent ($(this).val());
        limit = "&";
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to render a haml file in a javascript response like so:
I have a text area in my form which accepts all possible characters from
I want to construct a data frame in an Rcpp function, but when I
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

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.