You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alec Swan <al...@gmail.com> on 2011/10/31 02:19:29 UTC

AJAX-update on ajaxButton click

Hello,

I have a page which implements IHeaderContributor and injects CSS in
#renderHead(response). I would like to be able to update the CSS
injected when the user clicks an ajaxButton on the page. How can I add
page header to AjaxRequestTarget?

Thanks,

Alec

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AJAX-update on ajaxButton click

Posted by Igor Vaynberg <ig...@gmail.com>.
create a quickstart, its hard to grasp what you are doing from your description.

-igor

On Sun, Oct 30, 2011 at 11:21 PM, Alec Swan <al...@gmail.com> wrote:
> I am still having a problem after doing the following.
>
> I created a small panel on the page which contributes JavaScript that
> I want to be updated when AjaxButton is clicked. However, when
> AjaxButton is clicked I get the following error in Firefox:
> "attempt to run compile-and-go script on a cleared scope"
>
> Ajax-updating panel's JavaScript, e.g. jQuery UI, which depend on
> JavaScript scripts loaded by the parent page, e.g. jQuery Core, causes
> this problem. If I ajax-update the entire top page - everything works
> fine.
>
> I'd appreciate any thoughts on this.
>
> Thanks,
>
> Alec
>
>
>
> On Sun, Oct 30, 2011 at 7:19 PM, Alec Swan <al...@gmail.com> wrote:
>> Hello,
>>
>> I have a page which implements IHeaderContributor and injects CSS in
>> #renderHead(response). I would like to be able to update the CSS
>> injected when the user clicks an ajaxButton on the page. How can I add
>> page header to AjaxRequestTarget?
>>
>> Thanks,
>>
>> Alec
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AJAX-update on ajaxButton click

Posted by Alec Swan <al...@gmail.com>.
I am still having a problem after doing the following.

I created a small panel on the page which contributes JavaScript that
I want to be updated when AjaxButton is clicked. However, when
AjaxButton is clicked I get the following error in Firefox:
"attempt to run compile-and-go script on a cleared scope"

Ajax-updating panel's JavaScript, e.g. jQuery UI, which depend on
JavaScript scripts loaded by the parent page, e.g. jQuery Core, causes
this problem. If I ajax-update the entire top page - everything works
fine.

I'd appreciate any thoughts on this.

Thanks,

Alec



On Sun, Oct 30, 2011 at 7:19 PM, Alec Swan <al...@gmail.com> wrote:
> Hello,
>
> I have a page which implements IHeaderContributor and injects CSS in
> #renderHead(response). I would like to be able to update the CSS
> injected when the user clicks an ajaxButton on the page. How can I add
> page header to AjaxRequestTarget?
>
> Thanks,
>
> Alec
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org