PDA

View Full Version : Cursor Focus in Textarea even shifting keyboard to imagemap mode?


bearded
09-24-2002, 03:51 PM
I am using form-textarea (IE4/above Browser) to type message in non-English language. In my project there are two options to type any message in the textarea, one is through keyboard and other by klicking images through imagemapping. These both options can be used anytime during one typing session. But my problem is the placing of Cursor in the textarea. When I take change between options the cursor's focus changes. I want the Cursor always in the textarea, even if I change to any typing options. Please suggest me a javascript or any other solution.

ACJavascript
09-24-2002, 04:33 PM
where ever you have your javascript code put this..

document.FormsName.TextareasName.focus()

that should focus the cursor on the textarea..
FormsName=the name of the form your using
TextareasName=the name of the textarea the user is typeing in..

Hope this helps:D:D

bearded
09-25-2002, 04:39 AM
Thanks AC !
Your suggestion worked.

Regards,
Bearded