|
Posted by raj on 01/01/07 19:57
On Mon, 1 Jan 2007 18:50:54 +0000, Gleep wrote
(in article <crlip2hpo7hrsjckt2qqjdp8ukfj2tap0a@4ax.com>):
> 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.
>
>
Thanks Gleep. Much appreciated.
Raj
[Back to original message]
|