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

The Archive Base Latest Questions

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

I want to submit a hidden form when a value is entered into a

  • 0

I want to submit a hidden form when a value is entered into a text input field that is part of another form.

<form name="TDISLabelForm" target="fr1" method='POST' action="/createLabelTDIS.do">
                <input type="hidden" name="lab_no" value="<%=lab_no%>">
                <input type="hidden" name="accessionNum" value="<%=accessionNum%>">
                <input type="hidden" id="label" name="label" value="<%=label%>">

    </form>  
<iframe style="height:1px;width:1px;border:none:" id="fr1"></iframe>
<form name="ackForm" method="post" action="/UpdateStatus.do">

            <button type="button" value="Label">Label</button>
             <input type="text" id="label" name="label" value="<%=label%>"/>
             <input type="button" onclick="TDISLabelForm.submit()" value="Create">

 </form>

I want to submit the value of “label” when I click on the Create button that submits TDISLabelForm. How can this be done?

Thanks for your help.

  • 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-26T03:32:57+00:00Added an answer on May 26, 2026 at 3:32 am

    This is a start, to get you on your way http://en.wikipedia.org/wiki/XMLHttpRequest

    function submitLable(lblval){
       var payLoad = document.forms['TDISLabelForm']
                             .lab_no.value = document.forms['ackForm']
                             .label.value; // pass the value for visible for to the hidden form
       var request = requestObject();
       request.open("POST", "/createLabelTDIS.do", false); // post the value to createLabelTDIS.do for further processing as usual.
       request.send(payLoad);
    }
    
    
    function requestObject() {
       if (window.XMLHttpRequest)
          return new XMLHttpRequest();
       else if (window.ActiveXObject)
          return new ActiveXObject("Msxml2.XMLHTTP");
       else
          throw new Error("Could not create HTTP request object");
    }
    
    <input type="button" onclick="submitLable(this)" value="Create">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to submit a form like this: <input type=button onclick=$('#form1').submit(); value=Create /> but
I have a form on a non-SSL page that I want to submit as
I want to automatically populate a hidden form element with the value of what
I've got a form that has a single text field (for company): class Cas_Form_Company
Currently I have an HTML form with a hidden field right before a text
i want to put the value of id field of $info in my form's
I don't want to submit projectname.project folder. Now, I use like that git add
I have a case where i want to submit a form and get the
I have a form which I want to submit upon button click which is
i have a form and want to submit it with a script. i'm going

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.