CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 fckeditor textarea not working with autofill or javascript

Print topic Send  topic

Author Message
jsmonkey


Posts: 39
Posted: 03/15/2011, 4:42 PM

Hi all,
I have a textarea that gets populated by an autofill, then the user can choose to edit the text and submit. I wanted to beautify the text with html so I added fckeditor onload event to replace the text area. fckeditor appars and works properly but will not autofill. I tried reading the value of the fckeditor/textarea using some javascript but cant for some reason. Does changing the textarea to an fckeditor change the control name??

ANY advice you can give would be appreciated!

-J
_________________
-J
View profile  Send private message
TheunisP

Posts: 342
Posted: 03/15/2011, 5:03 PM

once the fckeditor is initiated you are not working with the text area anymore - to change the content of the editor you need to access its properties via its API - which is available through javascript
View profile  Send private message
jsmonkey


Posts: 39
Posted: 03/16/2011, 7:31 AM

can you give me an example of using javascript to say... alert( the contents of the fckeditor)?

I guess my question summary is: In CCS what is the fckeditor instance name? I tried this:

<script language="javascript">
function fitalert(){
var fitdata = FCKeditorAPI.GetInstance(this.getAttribute("id"));

alert(fitdata);
}
</script>

based on this in CCS:
//Attach FCKeditor @328-6651DADD
try {
var reportdataquestiontext_FCK = new FCKeditor(this.getAttribute("id"));
reportdataquestiontext_FCK.BasePath = "/fitwac/fckeditor/";
reportdataquestiontext_FCK.ToolbarSet = "Basic";
reportdataquestiontext_FCK.Height = "200";
reportdataquestiontext_FCK.Width = "750";
reportdataquestiontext_FCK.ReplaceTextarea();
} catch (e) {}
//End Attach FCKeditor

Thank you
_________________
-J
View profile  Send private message
TheunisP

Posts: 342
Posted: 03/16/2011, 8:17 AM

the fitdata as you have will have the instance of that editor you now can call the API e.g. fitdata.method

it seems to be the GetHTML you need - check this page:

http://docs.cksource.com/FCKeditor_2.x/Developers_Guide/JavaScript_API

View profile  Send private message
Waspman

Posts: 948
Posted: 03/29/2011, 12:36 AM

did you sort this? If not try NicEdit
_________________
http://www.waspmedia.co.uk
View profile  Send private message
jsmonkey


Posts: 39
Posted: 03/30/2011, 6:16 AM

Waspman: no, it is still outstanding. I submitted a support case and they replied that they were turning it over to the developers...

In the end, what seems to be problem is the instance name in: "var fitdata = FCKeditorAPI.GetInstance(this.getAttribute("id"))"

do you know what the instance name is or where to find it?

_________________
-J
View profile  Send private message
Waspman

Posts: 948
Posted: 03/31/2011, 2:49 AM

Are you using the Autofill function? if so why?

Did you try "nicedit"?
_________________
http://www.waspmedia.co.uk
View profile  Send private message
jsmonkey


Posts: 39
Posted: 04/01/2011, 11:59 AM

Yes, I am using Autofill to drop some initial text into the text area (based on some dropdown selections earlier in the workflow). The user gets to edit text if they wish. This text ends up in a form letter. All of my text has been HTML formatted, so, I figured it would be easier to have a WYSIWYG text area.

I'll try nicedit and post a reply. Thanks!!
_________________
-J
View profile  Send private message
Waspman

Posts: 948
Posted: 04/02/2011, 8:48 AM

Never used autofill, not sure what it's for:)

But I have done what you are trying to do. Simply setting session/url variables as the user travels through the app. Then when arriving at the form using a simple script to get the data from a table based on a condition; if CCGetSession("value") = whatever then go get the data in field whatever table whatever. That sort of thing.

T
_________________
http://www.waspmedia.co.uk
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.