Thursday, March 22, 2012

TextArea question

Hi Y'all,

Is it possible to make a textarea where some sentences/words at certain positions can't be altered? I want to make a textarea with a pre-defined lay-out without working with labels.

Thanks!

Could you please tell me a scenario where you need such type restrictions ?


navaneethkn:

Could you please tell me a scenario where you need such type restrictions ?

Honestly speaking, i'm also very curious abou this.

i think the general way/most common way is using label with textbox.My opinion may be TOTALLY WRONG.Based on my understanding, you cannot set "a fixed text area" within your textbox--the page code is transported to the client and get rendered by the IE browser, users can do whatever they want to a textbox/textarea without your notice on server side. well, maybe there is a way using javascript or ajax, but as far as i konw, i never heard about it.

Hope my suggestion helps :)


Hello

Yes, I was also confused by seeing the question. I tried several combination to make it work. But I think it is not possible to restrict some area of a control as not editable. One think can be done is using javascript as you told. If he knows the letters/words that can't be edited, this can be done using javascript. But it will take the entire contents of text area. Not in specific locations. Is there any function available in javascript to find current cursor position ?

0 comments:

Post a Comment