I missed the 'evalScripts:true'

Thanks.
Joel Alexandre


On 1/9/07, Hugo Madureira <[EMAIL PROTECTED]> wrote:

You can do it like this in the createWindow function:

var win = new Window(windowId, options);
new Ajax.Updater(win.getContent(), url, {asynchronous:true,
evalScripts:true});
win.setDestroyOnClose();


Hugo Madureira

On 09/01/07, Joel Alexandre <[EMAIL PROTECTED]> wrote:
> Hi,
>
> i have a window (prototype window) that has this contents being filled
from
> an ajax response.
>
> Every thing works fine.
> But if  the ajax response has some javascript code, that code ins't
> executed.
>
> example (i don't have the source of the application here with me, but
it's
> just to get the point) with pseudo-code:
>
> <script>
> window = createWindow()
>  callAjax()
>
>  function ajaxResponseHandler()
>  {
>    window.getContent().innerHTML = reponseText;
> }
>  </script>
>
> If responseText is something like:
>
> The data has been saved.
>  <script>
>  alert('javascript is run')
>  </script>
>
> The alert() isn't called.
>
> How can i show the reponseText AND let the javascript run?
>
> Thanks,
> Joel Alexandre
>
> _______________________________________________
> Javawin mailing list
> [email protected]
> http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
>
>
>

_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com

_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com

Reply via email to