Labels

How to make a text area

www.pardhans.cu.cc Some  times we want to insert plain text into  Blog Post or template. This may be a piece of HTML code or JavaScript that    you would like readers to copy

Some  times we want to insert plain text into  Blog Post or template. This may be a piece of HTML code or JavaScript that you would like readers to copy, such as the “Link to Site” code in the sidebar. It could also be the Terms of a Legal Agreement that users can view. How to creat forms in Blogs? the text box can also be used in feedback forms for users to input feedback and comments.

The HTML code of the text box makes use of the <textarea> property. For the text box to be in a Blog Post, while drafting the Post, switch to “Edit HTML” mode to insert the following code. If it is to appear in the sidebar or other parts of the template, go to Template -> Page Elements -> Add a Page Element and select “HTML/JavaScript” and insert this code.

Text area readers can input text

The textarea HTML code which allows readers to input TEXT is this:-
Example:-1

<textarea rows="6" cols="60">
TEXT
</textarea>


The attribute cols indicates the number of visible columns. The rows shows the number of visible rows. Note that this simply sets the dimensions of the text box. The lines of text can exceed the specified area, and when that happens, there will be scrollbars at the sides to allow users to view all the contents. In the above code, users can input words and characters into the text area. There is no limit to the amount of text that can be inserted but browsers may have their own preset limits.

This is what readers will see...

Any one can edit the text field        Try it

You can use it for a -Link to This Site- Code.. Example:-2

<textarea rows="6" cols="50">
<a href="http://www.pardhans.cu.cc"><img border="0" src="http://img189.imageshack.us/img189/3497/promotesmall.png"></a>
</textarea>

This will produce...

OK ... Now make try to edit this....
Why can't?         .....because  it is read only text area.

Read Only Attribute in Textarea

To display a read only text just add a few words in to example:2  text area code
The textarea code is:-
Read Only Code.. Example:-3

<textarea rows="6" cols="50" name="Link to Site" readonly="readonly">
&lt;a href="http://www.pardhans.cu.cc"&gt;&lt;img border="0" src="http://img189.imageshack.us/img189/3497/promotesmall.png"&gt;&lt;/a&gt;
</textarea>

This code makes a result that....

Note: &lt; = <
      &gt; = >
      &lt;/ARMY/&gt; = </ARMY/>

Word Wrap in Textarea

This is perhaps more relevant when we apply the textarea code to forms. When the text reaches the end of a row, the words can be wrapped in these manners:-

"soft" wrap – text will wrap as the user types but line breaks are not included when the text is submitted in a form.

"hard" wrap – if users enter line breaks into the text, it will be shown in the submitted form.

wrap is "off" – this will put all the words in one line, without any line breaks or wrapping.

The default value is "soft" wrap.
Word Wrap Code.. Example:-4
<textarea rows="8" cols="30" wrap="hard">
TEXT
</textarea>




 Copy& paste This code to your Website

Will make this link back button

www.pardhans.cu.cc

0 comments:

Popular Posts

Login

Add This Widget