You are here: Re: Newbie needs help to fix text in a textarea « PHP Language « IT news, forums, messages
Re: Newbie needs help to fix text in a textarea

Posted by Gleep on 01/01/07 18:50

On Mon, 1 Jan 2007 16:43:16 +0000, raj <raj@nospam.com> wrote:

>Hi,
>
>I'm a newbie needing help to fix imported text in a textarea i.e so that the
>imported text in the text area cannot be changed in the webbrowser. Here's
>the code snippet:
>
><p><textarea name="textarea2" cols="70" rows="7" wrap="virtual"><?php
>include("contracts/termsandconditions.txt"); ?></textarea></p>
>
>Thank you in advance,
>
>Raj




It doesn't make sense to bring this into a textarea. Just bring it into the web page in a div or
span or p

however if you insist on having this in a text area - you could 'disable' the textarea
i found this online somewhere

17.12 Disabled and read-only controls
In contexts where user input is either undesirable or irrelevant, it is important to be able to
disable a control or render it read-only. For example, one may want to disable a form's submit
button until the user has entered some required data. Similarly, an author may want to include a
piece of read-only text that must be submitted as a value along with the form. The following
sections describe disabled and read-only controls.

17.12.1 Disabled controls
Attribute definitions

disabled [CI]
When set for a form control, this boolean attribute disables the control for user input.
When set, the disabled attribute has the following effects on an element:

Disabled controls do not receive focus.
Disabled controls are skipped in tabbing navigation.
Disabled controls cannot be successful.
The following elements support the disabled attribute: BUTTON, INPUT, OPTGROUP, OPTION, SELECT, and
TEXTAREA.

This attribute is inherited but local declarations override the inherited value.

How disabled elements are rendered depends on the user agent. For example, some user agents "gray
out" disabled menu items, button labels, etc.

In this example, the INPUT element is disabled. Therefore, it cannot receive user input nor will its
value be submitted with the form.

<INPUT disabled name="fred" value="stone">


Note. The only way to modify dynamically the value of the disabled attribute is through a script.

17.12.2 Read-only controls
Attribute definitions

readonly [CI]
When set for a form control, this boolean attribute prohibits changes to the control.
The readonly attribute specifies whether the control may be modified by the user.

When set, the readonly attribute has the following effects on an element:

Read-only elements receive focus but cannot be modified by the user.
Read-only elements are included in tabbing navigation.
Read-only elements may be successful.
The following elements support the readonly attribute: INPUT and TEXTAREA.

How read-only elements are rendered depends on the user agent.

Note. The only way to modify dynamically the value of the readonly attribute is through a script.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация