You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by madan chowdary <ma...@yahoo.com> on 2007/04/09 12:23:26 UTC
[Tobago] Javascript reload after Ajax Request.
Hi All,
I was just working with JavaScript in Tobago pages.
I used onload function to call a javascript function which is used to Event.observe() on some components.
These scripts are placed in a panel which gets refreshed via Ajax.
The first time the page loads, then the desired task is achieved.
But if the panel is refreshed via Ajax, then the javascript is not working.
I need to call the function which was done onload, the same way when the panel is refreshed via Ajax.
Is this possible ?
Regards,
Madan
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/
Re: [Tobago] Javascript reload after Ajax Request.
Posted by Volker Weber <v....@inexso.de>.
Hi Madan,
the tc:script tag is currently not supported for ajax requests, see
https://issues.apache.org/jira/browse/TOBAGO-332
You can use tc:out with escape="false" e.g.
<tc:out escape="false" value"<script type=\"text/javascript\"
>alert('script on ajax');</script>" />
shuch pieces of javascript inside ajax requests are evaluated after
the html is replaced.
Regards,
Volker
2007/4/9, madan chowdary <ma...@yahoo.com>:
>
> Hi All,
>
> I was just working with JavaScript in Tobago pages.
>
> I used onload function to call a javascript function which is used to
> Event.observe() on some components.
>
> These scripts are placed in a panel which gets refreshed via Ajax.
>
> The first time the page loads, then the desired task is achieved.
>
> But if the panel is refreshed via Ajax, then the javascript is not working.
>
> I need to call the function which was done onload, the same way when the
> panel is refreshed via Ajax.
>
> Is this possible ?
>
> Regards,
> Madan
>
> ________________________________
> Here's a new way to find what you're looking for - Yahoo! Answers