Hi,

why not add:

    var win = new Window(this.dialogId, windowParam);
    win.getContent().innerHTML = content;
        if (parameters.evalScripts)
                win.getContent().innerHTML.evalScripts();


to Dialog._openDialog()

so you could do:
Dialog.confirm({url: 'index.html', options: {method: 'get'}}, 
{windowParameters: {className: "mac_os_x", title: 'nice Wnd',width:440,zIndex: 
999}, evalScripts: true});

best regards
Hinnack


>reply to message:
>date: 09.01.2007 12:35:10
>from: "Hugo Madureira" <[EMAIL PROTECTED]>
>to: [email protected]
>subject: Re: [Javawin] Loading window with a response containing Javascript 
>code
>
>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