This topic is locked
[SOLVED]

 Text Area - Read Only

12/23/2012 11:25:04 AM
PHPRunner General questions
T
Tempus_Erus author

Hi,
Picking up from a previous post of mine the below query makes the field read only bit allowing the user to scroll through.
$('textarea').attr('readonly','readonly');
However, if I have 3 'text areas' - A,B,C then all these textfields will be read only, when actually I only want text area A to be read only.
Does anyone know how I would make a selected field read only?
Thanks in advance.

C
cgphp 12/23/2012
T
Tempus_Erus author 12/25/2012



Check this article: http://xlinesoft.com/phprunner/docs/makereadonly.htm



Hi, aware of this, however the text area is greyed out not allowing the user to scroll through?.......

Sergey Kornilov admin 12/25/2012

You can do that using jQuery code similar to what you aleady use. Instead of making all textareas readonly use textarea IDs.

$('#field1_id').attr('readonly','readonly');

$('#field2_id').attr('readonly','readonly');


You can find field ID using 'Inspect element' in Chrome or in Firefox.

T
Tempus_Erus author 12/28/2012



You can do that using jQuery code similar to what you aleady use. Instead of making all textareas readonly use textarea IDs.

$('#field1_id').attr('readonly','readonly');

$('#field2_id').attr('readonly','readonly');


You can find field ID using 'Inspect element' in Chrome or in Firefox.


Thanks Sergey - looks exactly what I am after.....