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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:50:59+00:00 2026-06-04T23:50:59+00:00

I send a form via jquery ajax. I do not only want to send

  • 0

I send a form via jquery ajax. I do not only want to send the values of the formcollection I also want to send another id which is hidden in the page.

How can I send the form data + this id? Maybe there is a way to create one json object and I put everything in it?

   jQuery('#myForm').live('submit',function(event) {
        $.ajax({
            url: 'Url.Action("Create")',
            type: 'POST',           
            data: $('#myForm').serialize(),
            success: function( data ) {

            }
        });
        return false;
    });
  • 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-04T23:51:00+00:00Added an answer on June 4, 2026 at 11:51 pm

    If your hidden field is already in the form, It will be in your serialized data. You dont need to send it exclusively. If you still want to send another piece of data from outside of your form, you may send it as a querystring value and have your action method a parameter named itemId.(Assuming hdnID is the id of your hidden element)

    $.ajax({
            url: '@Url.Action("Create","Home")'+?itemId='+$("#hdnID").val(),
            type: 'POST',           
            data:  $('#myForm').serialize(),              
            success: function( data ) {
            }
         });
    

    http://api.jquery.com/serialize/

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

Sidebar

Related Questions

I have a form, in which I need to send data selected via AJAX
I want to dynamically send an upload form to CI via jQuery. The form
I'm using jQuery.ajax to extract form data from a page, and send it to
I am using Jquery AJAX to post a form on my page. I want
I need to obtain postdata from a form and send it via ajax .
I tried to make an contact form via AJAX with jQuery and Validation Engine
I am trying to send a form to a PHP file via jQuery. The
I am using jQuery Form Plugin to upload my files via AJAX and I
I've been working on a simple JQuery dialog form that loads in via AJAX.
I have some problem with my form. i want to use jquery ajax to

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.