We help IT Professionals succeed at work.
Get Started

Display problems using CFTextarea richtext="yes" in a CFWindow tag

984 Views
Last Modified: 2013-12-20
I've got a form within a CFWindow. Within the form, I'm using cftextarea with richtext="yes" toolbar="Basic".

It works fine except for one problem: When you are editing within the cftextarea, and you hit the [return] key, the whole cfwindow pops down to the bottom of the page. I've tried lots of different settings for the cfwindow tag itself - center=true, center=false,, x=0, y=0, modal=true/false, etc. The only thing that makes a difference is to remove "richtext=yes" from the cftextarea. Then the window doesn't pop to the bottom of the page any longer. But I'd like to keep that functionality, *and* have the window stay in the middle of the screen. Any ideas?

Thanks!
<cfform action="/_Forms/ManageEmails.cfm?tag=sendEmail" method="post" name="myForm" onsubmit="ColdFusion.Window.onHide('EmailAnswer#url.EmailID#',onhide)">
<h3>Answer this email</h3>
<p align="left">Type your answer to this email in the box below. If this is not a final answer, check the "pending" box before clicking "Send" and the email will stay active and assigned to you for further correspondence.</p>
<p align="left">The sender's original email will be appended to the bottom of the email that you send to them.</p>
<cftextarea name="txtEmailSent" height="220" width="630" richtext="yes" toolbar="Basic" style="padding:5px; margin:5px;"><cfoutput>
<p>Dear #incoming.strFName# #incoming.strLName#,</p>
<p>&nbsp;</p>
<p>Sincerely,<br />
#division# Customer Service<br />
Phone: #divisionPhone#</p>
</cfoutput></cftextarea>
<br /><br />
<span class="highlightArea">
<Label for="bitPending" class="radioSelect">
<input type="checkbox" id="bitPending" name="bitPending"> Pending</Label></span>
<cfoutput>
<input type="hidden" name="EmailID" value="#url.EmailID#">
<input type="hidden" name="strCSType" value="#url.type#" />
<input type="hidden" name="type" value="#url.type#" />
<input type="hidden" name="subject" value="#url.subject#" />
<input type="submit" class="buttons" value="Send" style="margin-left:250px;">&nbsp;&nbsp;<input type="button" value="Cancel" class="buttons" onClick="ColdFusion.Window.hide('EmailAnswer#url.EmailID#'),location.href='/_Forms/ManageEmails.cfm?tag=cancelAnswer&type=#url.type#&EmailID=#url.EmailID#&subject=#URLEncodedFormat(url.subject)#'">
</cfoutput>
</cfform>

Open in new window

Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE