Showing posts with label words. Show all posts
Showing posts with label words. Show all posts

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 ?

textbox

how can i select textbox ?
i have a dictionay . users search the words and how can i select textbox for next search .
for ex .
i search for Hello ====> Greetting ,......
when the search finished the textbox test going to blue ==> Hello
and when user click on textbox the textbox is going to empty


Could you please clarify what you are trying to do more ? I was unable to understand what you are trying to do !!
regards

Hi. I've read your message several times. Maybe its due to the numerous typos but each time, I think you mean something else: changing the font style of a word found inside of the text in a textbox, setting focus and selecting the entire textbox, changing the style of the entire textbox.

Please restate the problem and take the time to reread it before posting so that you know its clear.


sorry for confusing .
i want to when user searched a thing like hello and when the queryexecute the textbox is going to highlight and when he want to insert anew search the textbox going to empty .

after executing query , you must changeforecolor property of textbox to any color you want. In order to emptytextbox when user click on textbox , you can use javascript, addingjavascript to asp textbox control by usingattributes property of textbox control in page_load event:
txtwords.Attributes.Add("onClick","this.value=''");
Hope this will helping you solving your problem .