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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:57:33+00:00 2026-05-26T06:57:33+00:00

I’m not able to submit a form with 3 hidden inputs using JQuery and

  • 0

I’m not able to submit a form with 3 hidden inputs using JQuery and AJAX.

Here’s my javascript function:

  createTdisLabel=function(formid){
        document.forms['TDISLabelForm'].label.value = document.forms['acknowledgeForm'].label.value;
        var url = '<%=request.getContextPath()%>'+"/createLabelTDIS.do";
        var data=$(formid).serialize(true);
        new Ajax.Request(url,{method:'post', parameters:data,onSuccess:function(data){
            $("#createLabel").html(data.label);
        }});
    };

   function submitTDISform()
    {
      document.TDISLabelForm<%=segmentID%>.submit();
    }

Here are the hidden form and the main form:

   <form name="TDISLabelForm" id="TDISLabelForm<%=segmentID%>" method='POST' onsubmit="createTdisLabel('TDISLabelForm<%=segmentID%>');" action="javascript:void(0);">
        <input type="hidden" id="labNum" name="lab_no" value="<%=lab_no%>">
        <input type="hidden" id="accNum" name="accessionNum" value="<%=accessionNum%>">
        <input type="hidden" id="label" name="label" value="<%=label%>">
    </form>

    <form name="acknowledgeForm" id="acknowledgeForm_<%=segmentID%>" onsubmit="updateStatus('acknowledgeForm_<%=segmentID%>');" method="post" action="javascript:void(0);">

        <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
            <tr> <td>
             <input type="text" id="label" name="label" value="<%=label%>"/>
             <input type="button" id="createLabel"  value="Create" onClick="submitTDISform();">
              </td></tr> </table> </form>

When I click on the Create button in “acknowledgeForm”, “TDISLabelForm” is not getting submitted. I opened Firebug and see no call of the JavaScript function at all. What am I doing wrong?

  • 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-26T06:57:33+00:00Added an answer on May 26, 2026 at 6:57 am

    My guess is you may have not included the javascript file in your html page. That is why it is not able to see the function. Also, since you are using jquery, i think it is better to use it also for event handling

     $("#createLabel").click(your_javascript_function());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I need a function that will clean a strings' special characters. I do NOT
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm making a simple page using Google Maps API 3. My first. One marker
We're building an app, our first using Rails 3, and we're having to build

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.