Frens,I would like to know how to make a textarea which the text is only read only and also I want below the text area there is a button that when pressed will highlight the text which is in the text area, thanks in advance
you can disable and enable it You do this by setting the disabled property and then onclick of the button do something like document.getElementByID("buttonname").disabled = false
Thanks calebbender, but I'm a bit newbie so if you are not mind can frens directly write the html code?
kie, to disable a text area you need to set the disabled attribute to disabled thus it will be like this: <textarea disabled="disabled"></textarea> For the select all button, I think this could help you http://dynamicdrive.com/dynamicindex11/selectform.htm Don
As Dondon2d said, just add disabled as an attribute of the textarea element. You only need to use disabled="disabled' when using XHTML. [b]HTML VERSION[/b] <textarea disabled></textarea> [b]XHTML VERSION[/b] <textarea disabled="disabled"></textarea> Code (markup):
Yes you can add a disabled="disabled" for the text area In the case of an input, if you want to disable it you can use <input type="text" disabled></input>
Thanks frens I have tried what you all said but the result is I can't highlight the text also what I mean is read only but still people can highlight the text oya dondon2d I have seen the site you gave me..but that one when I have clicked on the select all..it will first highlight the text but when I move my mouse it will make the highlight text becomes not high lighted again(using Firefox browser)..waiting for your help frens
For selecting the text, I believe all modern browsers support the "select" method for form inputs. For instance the following works in every browser I have access too. <textarea readonly="readonly" onclick="this.select()">I'll never change !</textarea> Code (markup):