on my last text entry field i'm calling a javascript to populate the textarea with previous text entered fields. this is last field call
<tr>
<td align="right" valign="middle"><b>BIP:</b></td>
<td align="left" valign="top">
<input type="text" name="bip" size="16" maxlength="6" onFocus="CalcTxtArea()" value="<?PHP print ($bip); ?>">
</td>
</tr>
this is the Javascript:
<SCRIPT LANGUAGE="JavaScript">
function CalcTxtArea()
{
A = (document.myForm2.segvendor.value);
B = (document.myForm2.segaloc_addr1.value);
C = (document.myForm2.segaloc_city1.value);
D = (document.myForm2.segaloc_state1.value);
E = (document.myForm2.segaloc_zip1.value);
F = (document.myForm2.segaloc_zip41.value);
G = (document.myForm2.segzloc_addr1.value);
H = (document.myForm2.segzloc_city1.value);
I = (document.myForm2.segzloc_state1.value);
J = (document.myForm2.segzloc_zip1.value);
K = (document.myForm2.segzloc_zip41.value);
TxtArea = A+':'+B+' '+C+','+D+' '+E+'-'+F+'||'+G+' '+H+','+I+' '+J+'-'+K;
document.myForm2.textarea1.value = TxtArea;
}
</SCRIPT>
this is my textarea field:
<textarea cols="95" rows="5" name="textarea1"><?php echo $textarea1; ?></textarea>
after a segment is added(click submit button) i want the addr,city,state displayed in the textarea....and then allow another entry and then I want that line displayed...not sure how to append the textarea and store?
text area should look like this after 2 segments added:
(see .jpg)
i'm getting the current segment displayed to textarea after the submit button, but loosing the data when adding next segment...