In html page I have two forms:

<form name=fm1 method=post action=aaa.html>
<input type=text name=a1>
<textarea name=a2></textarea>
<input type=submit>

<form name=fm2 method=post action=bbb.html>
<input type=text name=b1>
<input type=submit>

Now the question is if I submit "fm2", is it possible to also submit the text area which is in "fm1"? I don't want to repeat the same text area in both "fm1" and "fm2", so this text area can either submit to "fm1", or "fm2".

Thanks for any help.

11 Years
Discussion Span
Last Post by katarey

Hi there,

Well I didn't seen any direct way to do this, but you can use the, there may have a hidden field in fm2 for storing the value of textarea (fm1) and use this very very simple function to fill the value in hidden field.

<title> </title>
<script type="text/JavaScript">
Function filldata () { 
document.fm2.b3.value = document.fm1.a2.value;
<form name="fm1" method="post" action="aaa.html">
<input type="text" name="a1">
<textarea name="a2" onblur="filldata()"></textarea>
<input name="Submit" type=submit value="Submit">

<form name="fm2" method="post" action="bbb.html">
<input type="text" name="b1">
<input name="b3" type="hidden" value="" />
<input name="Submit" type="submit" value="Submit">

I hope it may help you,

Best Regards,
Rahul Dev

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.