You can't use line breaks in a Textbox. If you want line
breaks, you have to use a Text Area Box. The coding on
the button would then be
<input type="button" value="Button" name="B3"
onclick="document.forms[0].S1.value='first\nsecond'">
where S1 is the name of the Text Area Box and \n
generates a line break.
You may need to add a "wrap" attribute to the Text Area
Box. This is something you need to do in Code view. Here
are the possibilities.
wrap="soft" is the default. Text is displayed with
wordwrapping and submitted without carriage
returns and line feeds.
wrap="hard" Text is displayed with wordwrapping and
submitted with soft returns and line feeds.
wrap="off" Wordwrapping is disabled. The lines appear
exactly as the user types them.
also, please remember that ordinary HTML treats line
endings the same as tabs or spaces. As a result, even
though you capture data with line endings intact, the
browser may ignore them when it later displays the data.
Getting the line endings to appear may require further
HTML, CSS, or script coding.
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
-----Original Message-----
Thanks, it works great! Another problem came up though,
how do I add a break in a text box, since it is not html
I can not use the regular break command. Here is an
example of what I mean:
Text A:
Text B:
How do I atain that type of fomrating.
-----Original Message-----
-----Original Message-----
Hi,
Howdy.
I am having problems creating a code that will allow me
to post a text message within a text box. I have created
a button and would like it to insert a phrase in the
text box on the site when clicked. I am not sure how to
go about this. If anyone has any idea please help.
Thanks.
Code the button like this:
<input type="button" value="Button" name="B3"
onclick="document.forms[0].T1.value='a phrase';">
where T1 is the name of the text box where you want the
phrase to appear.
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
.
.