Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set focus to cftextarea using rich text

Status
Not open for further replies.

lucidtech

IS-IT--Management
Jan 17, 2005
267
US
I have a cftextarea with richtext=true. I have absolutely everything working correctly except this :

When the user clicks a hyperlink, I want to set focus to the textarea so the user doesn't need to click to start typing. Figured this would be the easiest part of this whole deal, but I'm stumped.

Here's the code for my textarea

<cftextarea rows="10" height="325" cols="75" name="msg" richtext=true toolbar="MyToolbar" id="msg" basepath="rich">#msg#</cftextarea>
 
Have you tried?

<script>
document.yourformname.msg.focus();
</script>

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
<script>
document.yourformname.msg.focus();
</script>

Yes, that is what I would have suggested. But I seem to recall something about focus problems with textareas involving the FCKEditor. Unfortunately, I cannot remember the details. So you might try a google search on that.



----------------------------------
 
Is your name property set on the cfform tag this textarea tag is within?

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top