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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:06:39+00:00 2026-06-08T20:06:39+00:00

I have the following event on a check box in CoffeeScript: $(‘#check_box’).click -> opts

  • 0

I have the following event on a check box in CoffeeScript:

$('#check_box').click ->
  opts = 
    target: '#project_total'
    beforeSubmit: preSubmit
    success: postSubmit
  $('form').ajaxSubmit(opts)

preSubmit = ->
  $('input#running').remove()
  $('<input/>').attr('type', 'hidden').attr('id', 'running').attr('name', 'running').attr('value', 'true').appendTo('form')

But the input element, #running, is not sent as part of the ajaxSubmit call. All other form values are sent. If I click the check box, then click the Submit button, the #running value is sent.

How can I send the value of #running along with the ajaxSubmit() call?

  • 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-08T20:06:41+00:00Added an answer on June 8, 2026 at 8:06 pm

    If you want to send an hidden element with a form, you should use a Type=”Hidden” in the input you want to send aswell. In this case your running should look something like

    <input id="running" type="hidden" value="somevalue"/>

    and it should be sent along with the whole form.

    This code is a bit confusing, why do you actually remove input#running and then create it afterward?

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

Sidebar

Related Questions

I have the following click event $(.element).click(function() { var idNum = $(this).getID; $('#new-'+idNum).fadeIn(); });
I have the following line bound to a click event: $(this).parents(.addonoptions).children().removeClass(highlight); It should strip
I have the following code bound to the click event of a button: function
I have the following to capture the checkbox check event of form with id=form1:
I have a following script: $(document).ready(function() { $('#q1_6').on(click, function(event){ $('#q1-f').slideToggle(350); }); $('#q1_7').on(click, function(event){ $('#q1-m').slideToggle(350);
I have following example What it should do: check is there .box-wrapper in the
I have following event class. I have a question related to the Property method
I have the following event listener in SecurityConfig security { active = true useSecurityEventListener
I have the following custom event: package com.un.photoManager.events { import flash.events.Event; import mx.collections.ArrayCollection; public
I have the following paint event (form) that is drawing the rectangle: void LogicSimulationViewerForm_Paint(object

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.