Hi Friends...
I want a non-editable text in textarea. In that textarea user can write but can't edit or delete the default one.
I uses attribute "readonly="yes"" and editable="false" but these tags make full text area non-editable which is not required.
I want the editable text area with non-editable default text.
I don't Know what should I do??
Please help....
Thanks in advance...

The attribute to use would be disabled.

http://www.w3schools.com/TAGS/att_textarea_disabled.asp

While w3schools.com is a joke to learn from, it's a good reference for a vast assortment of language attributes.

Please don't suggest any idea before know the actual requirement. Atleast you have to read the thread first properly. I do not want to diaabled whole text area..

commented: dont be rude, the one you PO is likely the one who will help you, until you p them off -3

<textarea rows="3" cols="25" disabled="disabled">sample text</textarea>

TRY

2 input fields, concatenated on the server onsubmit is far simpler than attempting the impossible

<input type='text' value='this text value is in hardcode or generated by the script when creating the page the user cant change it' name='oneway2doit1'>
<textarea name='oneway2doit2'>type your *** here</textarea>
$textarea=$_post['oneway2doit1'].$_post['oneway2doit2'];

Please don't suggest any idea before know the actual requirement. Atleast you have to read the thread first properly. I do not want to diaabled whole text area..

Uh, what? I read it correctly, but didn't think that's what you were going after. There is NO WAY to do it using text unless you use two different input fields on that page as almostbob suggested.

Well, there is one way, but it's not with HTML. You'd simply place a background image onto the text area and put padding on that area covered by the image so no one can write on it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.