Hi
I wrote a plugin that does the following:
You click a button and with a thickbox effect there appear some forms. User can enter some stuff and when the ok button is clicked the things are supposed to go into the editor. The Problem:
This doesn't work, as somehow I don't have access. Is this just a general restriction or do I just not do it right?
I wrote a plugin that does the following:
You click a button and with a thickbox effect there appear some forms. User can enter some stuff and when the ok button is clicked the things are supposed to go into the editor. The Problem:
FCK.InsertHtml(text);
This doesn't work, as somehow I don't have access. Is this just a general restriction or do I just not do it right?
Re: Problems with AJAX and FCK
I've done a couple of the same types of plugins and I'm assuming from your ajax and thickbox references you're using the thickbox to open an iframe and then try to display the content through there. If this is the case I think you'll need window.parent.FCK. You also may be using the wrong object. Unfortunately without any examples it's hard to answer correctly. Hope this helps, if not post some code and I'll try again
. Good luck
Re: Problems with AJAX and FCK
hello
Thanks for the answer. Ok, I'll be more specific:
In my Plugin, when I press the button:
This opens a thickbox layer where I do some stuff. With this code here I want to take the stuff from the thickbox layer back to the editor
I though get the following error:
Any ideas?
Re: Problems with AJAX and FCK
I'm pretty sure when you open thickbox it is not opening an iframe with the way you implemented it. So you shouldn't have to do window.parent from the thickbox.
I'm assuming this will set the parent.parent.FCK to the relevant FCK Object and allow you to call it's functions. I'm also assuming that it will still have access to the correct iframe...a lot of assumptions. Good luck.
Re: Problems with AJAX and FCK
I found a workaround, but it's not too good. Now I really have to solve the problem. Maybe if I clearify the problem:
As above I open a form with Thickbox. It's though not in an Iframe but in a div. Well, in that div there is as I said a form. When I press the submit button, the following thing should happen:
Well, everything works, but I just can't access the FCKeditor object ("FCKeditor is not a function"). I already tried with FCK and oFCKeditor and all kinds of parent, but it doesn't work. I'm not too much into Javascript, but when I open firebug and switch to the DOM View, I can see there a red variable called "FCKeditor" and when I click the plus "prototype" appears and plus again there are some more variables.
Well, I hope this defines the problem well. I really hope I can get some help.... please.