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....
$("#search_head #query").val($(this).val()); }); });
<input id="query" />
<input id="query2" placeholder="Blur me" value="Hi there" />
Use .change() .For text boxes, you probaby won't see any difference though.
@diafol thanks for your response ..yeah i need to code for not same page , these two textboxes are diffrent page and how to change textbox1 value should be affected in another form value of textbox2 ??? that only i needed ...
OK, assuming you are submitting the first form normally (submit button->server->operations->response [e.g. serve new page with 2nd form]).
This will have nothing to do with jQuery, unless you want to use webstorage - which I wouldn't suggest for this. It's pure PHP.
You can store the changed data "permanently" in a DB or file or you can store it temporarily in a COOKIE or a session variable. It depends on what the change is supposed to do. If it is part of a 'wizard' or multi-step type form, then you may want to use a session variable. If it is like a change of address, then this would be a permanent change, so use a DB. These are pretty loose rules, since there are many exceptions.