Skip to main content
Inspiring
December 18, 2019
Question

ColdFusion 2018 CFTextarea

  • December 18, 2019
  • 2 replies
  • 1205 views

Problem getting focus on cftextarea in an iframe.  Page greys out when any toolbar item is selected.

Please help!

<cfTEXTAREA richtext=true skin="moono" toolbar="Basic" WRAP=PHYSICAL ID="FormsMultiLine1" style="font-family : Tahoma, times new roman; font-size : 9pt" NAME="copy" height="200" width="550">#copy#</cfTEXTAREA></TD>

This topic has been closed for replies.

2 replies

Charlie Arehart
Community Expert
Community Expert
December 19, 2019

I appreciate that you may be getting frustrated about all this, RaehmLeonard, and I see you've offered two replies since my last one. But let's take things one step at a time. I'm pretty sure we'll get you to a solution. 

 

First, yes, people DO use those tags, but things DO change from one release to another. That's why I sought clarification first on when this HAD worked for you (if at all).  But then I also asked something very specific, which you did not answer. I will try again:

 

And are you familiar with using browser "dev tools"? If so, does its "network" tab show any failed requests calling back to CF (for javascript files, etc.)? And/or does its "console" tab show javascript errors?

 

It's ok if you are not familiar with such tools. Just say so. But if you are, did you try it? The reason I ask is that it may have indicated a particular common problem.

 

As you may know, there are in fact some features deprecated (and still others "retired") in CF2018. They are listed at https://helpx.adobe.com/coldfusion/deprecated-features.html, and while cftextarea is not listed as one of them, I'm willing to bet that's a mistake and that it is. Let me explain.

 

If you DO see errors in your dev tools, especially 404's related to calls back CF, then you are hitting the problem that is listed at the bottom of that page. And you can follow the advice offered there, to add the yui library back to CF.

 

If that fixes your problem, great. Let us know, and we (or you) can get word to Adobe to update that page to mention CFTEXTAREA also. And to your last comment, we could get them also to add to that doc page on the tag itself to clarify that it's deprecated in 2018 (as was done for the pages for related things affected by this, like cfcalendar, cftree, and cfmenu.

 

BTW, even being marked "deprecated" or "retired" that doesn't mean one CAN'T use the feature. As explained on that page, deprecated means "no longer updated" which means most should not continue using, or should be seeking alternatives. And retired means not working by default--so in this case requiring that re-adding in of the YUI library.

 

That's why people would indeed have problems with this out of the box. So yes, "surely we have had users with this problem", and yes some have turned to "seeking alternative [embeddable web] text editors".

 

Indeed, some may soon chime in (perhaps without even reading my comment here) to point out that you SHOULD not be using any CF tags that generate and use javascript, and that CF's support of those has always been "horrible" and "dated", and that "any good developer" should know that they SHOULD in fact be seeking out alternatives to such things as text editors, tree controls, etc. And there are of course many such alternatives, in most of the many available javascript/ajax frameworks out there.

 

But since you're asking about getting CFTextarea working, that's what I have been focused on. I'd love to hear whether the above has helped, and if not, again what you see in the dev tools in the network and/or console tabs. The diagnostics to solve your problem may well be right there. Let us know what you find.

/Charlie (troubleshooter, carehart. org)
Inspiring
December 19, 2019

No, I am not familiar with "development tools". 

To clarify, the "moono" skin tag works fine with CF 2018 on a plain html page, but not a iframed page.

So I believe this is really a focus issue.  That is, setting focus to the frame containing the cftextarea tag.

If you can assist on that subject, great.  If not, I'm still looking for alternate skin to try.  If you know of any, please advise.

Thanks,

Community Expert
December 19, 2019

Normally when we're talking about "focus" in JavaScript, we mean "where the cursor is right now". I don't think that's your problem. I do think it's possible that your browser is refusing to load resources from your main page into your iframe. This isn't really a CF problem. This is your browser trying to protect you from loading potentially dangerous code.

 

But this is really just a guess. We'd need to see a lot more of what's going on than your CFTEXTAREA tag. You might need to actually post all or most of the main page and the iframe for anyone to figure it out.

 

Alternatively, you can use the developer tools within your browser to see whether you're getting errors loading the CFTEXTAREA as Charlie suggested. Search on "chrome dev tools tutorial" for a quick start on how to do that. You could then post the specific JS errors you see there, if any. Even then, though, we'd probably need a little more information to come to a solution.

 

Dave Watts, Eidolon LLC

Dave Watts, Eidolon LLC
Charlie Arehart
Community Expert
Community Expert
December 18, 2019

There can be various explanations. First, is this a new problem? If so, what changed? Or are you trying it for the first time? If so, what CF version? and what update is applied?

 

And are you familiar with using browser "dev tools"? If so, does its "network" tab show any failed requests calling back to CF (for javascript files, etc.)? And/or does its "console" tab show javascript errors?

/Charlie (troubleshooter, carehart. org)
Inspiring
December 19, 2019

I've been using this following cftextarea tag with CF11: <cftextarea richtext="yes" skin="silver" toolbar="Basic" .....

This does NOT load in CF2018. I was advised to use: <cftextarea richtext=true skin="moono" toolbar="Basic" ...

However, this tag does not function in a framed web page.

Surely, you have had other users with this problem and have alternative text editors?

If so, please advise.

Thanks,