Dr.WiggY
07-16-2003, 12:40 AM
I require a function that adds multiple lines of text to what already exists in the text area. This is what i came up with but am unsure why it dont work :confused:
Its to create functions similar to those link and Bold buttons in the forum here but to add HTML in this case its adding a table with 2 columns.
<script language = Javascript 1.2>
Function addtableone();
{
document.form2.para1.value = document.form2.para1.value + vbcrlf + "<table width='100%' bgcolor=''>" + vbcrlf + "<tr>" + vbcrlf + "<td width='50%'>INSERT COLUMN 1 CONTENT HERE</td>" + vbcrlf + "</tr>" + vbcrlf + "<tr>" + vbcrlf + "<td width='50%'>INSERT COLUMN 2 CONTENT HERE</td>" + vbcrlf + "</tr>" + vbcrlf + "</table>"
}
</script>
and to execute the Function:
<input type="button" name="fnTableOne" value="ADD TABLE" onClick="addtableone();">
Surely this is a rather easy thing to fix, hopefully :)
Its to create functions similar to those link and Bold buttons in the forum here but to add HTML in this case its adding a table with 2 columns.
<script language = Javascript 1.2>
Function addtableone();
{
document.form2.para1.value = document.form2.para1.value + vbcrlf + "<table width='100%' bgcolor=''>" + vbcrlf + "<tr>" + vbcrlf + "<td width='50%'>INSERT COLUMN 1 CONTENT HERE</td>" + vbcrlf + "</tr>" + vbcrlf + "<tr>" + vbcrlf + "<td width='50%'>INSERT COLUMN 2 CONTENT HERE</td>" + vbcrlf + "</tr>" + vbcrlf + "</table>"
}
</script>
and to execute the Function:
<input type="button" name="fnTableOne" value="ADD TABLE" onClick="addtableone();">
Surely this is a rather easy thing to fix, hopefully :)