D
David
Hi,
I have a simple form which uses the following code to add lines into a
textarea field from a button
The problem is that it always seems to begin on the 3rd line, i.e.
skips line 1 & 2 in the textarea box
I would like it to start at line 1, how can I adjust the code to do
this ?
-----------------------------------------
<SCRIPT language="JavaScript">
<!--
function addItem(){
var Unit = document.schedule.schedule_update.value
if (Unit=='')
{Unit += document.formname.quantity.value + " x "
+document.formname.list2.value}
else
{Unit += '\n' + document.formname.quantity.value + " x " +
document.formname.list2.value}
document.schedule.schedule_update.value = Unit
}
//-->
</SCRIPT>
------------------------------------------------
Many thanks
David
I have a simple form which uses the following code to add lines into a
textarea field from a button
The problem is that it always seems to begin on the 3rd line, i.e.
skips line 1 & 2 in the textarea box
I would like it to start at line 1, how can I adjust the code to do
this ?
-----------------------------------------
<SCRIPT language="JavaScript">
<!--
function addItem(){
var Unit = document.schedule.schedule_update.value
if (Unit=='')
{Unit += document.formname.quantity.value + " x "
+document.formname.list2.value}
else
{Unit += '\n' + document.formname.quantity.value + " x " +
document.formname.list2.value}
document.schedule.schedule_update.value = Unit
}
//-->
</SCRIPT>
------------------------------------------------
Many thanks
David