Jump to content

pass the text box value from one form to another form textbox jquery


infoitmanoj

Recommended Posts

I have tried below code .. its working fine and textbox value should be passing in same form ....but i need one textbox to be one form and another text box to be in another form value should be passed....

$(document).ready(function()

{ $("#query2").blur(function(e)

{

$("#search_head #query").val($(this).val()); }); });

 

 

<form id="search_head">
    
    <input id="query" />
    <input id="query2" placeholder="Blur me" value="Hi there" />
</form>
Edited by infoitmanoj
Link to comment
Share on other sites

What have you tried?

I have tried below code .. its working fine and textbox value should be passing in same form ....but i need one textbox to be one form and another text box to be in another form value should be passed....

$(document).ready(function()

{ $("#query2").blur(function(e)

{

$("#search_head #query").val($(this).val()); }); });

 

 

<form id="search_head">

 

<input id="query" />

<input id="query2" placeholder="Blur me" value="Hi there" />

</form>

Link to comment
Share on other sites

Are you trying to pass values between forms on different pages? If so, submit the first form and use PHP to grab the value before building the other form on the second page. If you want to move the value into another form on the same page, just change the JQuery target.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.