On Mon, Feb 25, 2013 at 4:32 PM, Martin Dietze <[email protected]> wrote:

> On Mon, February 25, 2013, Martin Grigorov wrote:
>
> > replace with:
> >       response.render( OnDomReadyHeaderItem.forScript( script ) );
>
> OK, did that. Now I am running into a different error when I
> press "save" on my editor component. For this event I have an
> AjaxCallListener like this:
>
> | AjaxCallListener myAjaxCallListener = new AjaxCallListener();
> | myAjaxCallListener.onBeforeSend( return "for ( instance in
> CKEDITOR.instances ) CKEDITOR.instances[instance].updateElement();" );
>

except the leading "return" all looks OK to me.
Add some logging with console.log() and see what is available in the
context.


>
> This is necessary to copy the text the user has entered from the
> Javascript code back into the form component. On "save" I now
> get the following error:
>
> | Wicket.Ajax: An error occurred while executing Ajax
> request:ReferenceError: instance is not defined
>
> It looks to me like the script in OnDomReadyHeaderItem was
> executed allright, but the state inside the Javascript code
> has been lost in the meantime?
>
> Cheers,
>
> M'bert
>
> --
> ----------- / http://herbert.the-little-red-haired-girl.org /
> -------------
> =+=
> Arthur: "It's at times like this I wish I'd listened to my mother"
> Ford  : "Why, what did she say?"
> Arthur: "I don't know, I never listened"
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to