How to pass input value from one form to another form at same jsp page?

151291

I have two forms in my jsp page, first form have input values and second form have submit button, i can't use both in same form because of some issue. now i want to access first form value into second form.

My Sample Code is Here,

<form name="onchange" id="first">
<div><input type="text" name="n1"></div>
<select onchange="document.forms['onchange'].submit();" name="select">
<option value="A">A</option>
<option value="A">A</option>
</form>

<form action="servlet" id="second">
<input type="submit" name="sub" value="Submit">
</form>

I need to access a first form value to second form on submit. is it any way to access? Thank You.

Standin.Wolf

I dont exactly know what you want to do.But you cant send data of one form using a submit button of another form.

You could do one thing either use sessions or use hidden fields that has the submit button. You could use javascript/jquery to pass the values from the first form to the hidden fields of the second form.Then you could submit the form.

Or else the easiest you could do is use sessions.

IN Jquery

<form>
<input type="text" class="input-text " value="" size="32" name="user_data[firstname]" id="elm_6">
<input type="text" class="input-text " value="" size="32" name="user_data[lastname]" id="elm_7">
    </form>

    <form action="#">
<input type="text" class="input-text " value="" size="32" name="user_data[b_firstname]" id="elm_14">
<input type="text" class="input-text " value="" size="32" name="user_data[s_firstname]" id="elm_16">

<input type="submit" value="Continue" name="dispatch[checkout.update_steps]">
    </form>


$('input[type=submit]').click(function(){
    $('#elm_14').val($('#elm_6').val());
    $('#elm_16').val($('#elm_7').val());
});

This is the jsfiddle for it http://jsfiddle.net/FPsdy/102/

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to pass form input value from jsp page to java class?

From Dev

How to pass a value from one jsp to another jsp page?

From Dev

How to pass value from one form to another form on submiting it?

From Dev

How to pass form fields from one page to another page in ReactJS?

From Dev

How to send a value from one JSP page to another for each loop without a form?

From Dev

How to pass form input and music from one page to another using JavaScript?

From Dev

How to pass form input and music from one page to another using JavaScript?

From Dev

How To Pass Form Data from One Page To Another using FlaskApp

From Dev

jquery - copy value of input from one form to another (form and input named the same)

From Dev

pass a value from one form to another

From Dev

How to pass a value from loop of JSP page to another JSP page?

From Dev

How to copy the selected value from one form input field to another form input field

From Dev

how to show button of one form below another form if they are on the same page

From Dev

How to pass value from one form to another form's dynamically created control

From Dev

How to pass value from one form to another form in alfresco activiti workflow?

From Dev

How can I pass a php variable to another form in the same page?

From Dev

Display form input values from one page to another

From Dev

jsp form returns null value in one input

From Dev

How to pass and put variable from a php page into a another page(form)?

From Dev

how to pass $db->insert_id from one form to other on the same page

From Dev

How can I pass multiple cell values of datagridview from one form to another at same time in C#?

From Dev

how to pass the value from one page to another page in angular?

From Dev

how to pass the value from one page to another page in html

From Dev

How to add a dynamic value from one form to another page in javascript conversion coding?

From Dev

How to pass data from one form to another suitescript

From Dev

How Do i pass a Public variable from one form to another

From Dev

How can i pass content inside a textarea in a form to another form in same page without submit button

From Dev

how to pass the form data and redirect to another page

From Dev

How to pass the values from one jsp page to another jsp without submit button?

Related Related

  1. 1

    How to pass form input value from jsp page to java class?

  2. 2

    How to pass a value from one jsp to another jsp page?

  3. 3

    How to pass value from one form to another form on submiting it?

  4. 4

    How to pass form fields from one page to another page in ReactJS?

  5. 5

    How to send a value from one JSP page to another for each loop without a form?

  6. 6

    How to pass form input and music from one page to another using JavaScript?

  7. 7

    How to pass form input and music from one page to another using JavaScript?

  8. 8

    How To Pass Form Data from One Page To Another using FlaskApp

  9. 9

    jquery - copy value of input from one form to another (form and input named the same)

  10. 10

    pass a value from one form to another

  11. 11

    How to pass a value from loop of JSP page to another JSP page?

  12. 12

    How to copy the selected value from one form input field to another form input field

  13. 13

    how to show button of one form below another form if they are on the same page

  14. 14

    How to pass value from one form to another form's dynamically created control

  15. 15

    How to pass value from one form to another form in alfresco activiti workflow?

  16. 16

    How can I pass a php variable to another form in the same page?

  17. 17

    Display form input values from one page to another

  18. 18

    jsp form returns null value in one input

  19. 19

    How to pass and put variable from a php page into a another page(form)?

  20. 20

    how to pass $db->insert_id from one form to other on the same page

  21. 21

    How can I pass multiple cell values of datagridview from one form to another at same time in C#?

  22. 22

    how to pass the value from one page to another page in angular?

  23. 23

    how to pass the value from one page to another page in html

  24. 24

    How to add a dynamic value from one form to another page in javascript conversion coding?

  25. 25

    How to pass data from one form to another suitescript

  26. 26

    How Do i pass a Public variable from one form to another

  27. 27

    How can i pass content inside a textarea in a form to another form in same page without submit button

  28. 28

    how to pass the form data and redirect to another page

  29. 29

    How to pass the values from one jsp page to another jsp without submit button?

HotTag

Archive