function for onsubmit or onclick

admin

Administrator
Staff member
Anyway to put in a newline or something to stop my output from creating a long unwrapped line? I want to make some function onsubmit where it forces a newline character after 10 characters. I seem to have a problem with my input form where it doesnt wrap after I enter the data and long sentences force my output box to look like a rectangle.



Here is what is happening:

Long sentence keeps going and going where it extends my output box too long.

I need it to wrap in my output such as:

Long sentence keeps going and going
where it extends my output box too long.


Here is my html form part where I need to use a form input for my entry:

<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=3>
<form action="mypage.html" method=post>
<TR>
<TD>
<TH>Heading</TH>
<TD><input name="heading" type="text" size=30></TD>
</TR>
</form>
</table>

Would it be?:
function forcenewline()
{
//if wordcount > 10
{
"/n"
}
}


I cant use <textarea> in this calendar script so please advise on how I could make a function to work on the onsubmit or onclick event.
 
Back
Top