struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pablo Vázquez Blázquez <pvazq...@denodo.com>
Subject Re: Struts2 + Dojo 0.4 + unbeforeunload problem
Date Thu, 11 Sep 2008 14:44:06 GMT
I have executeScripts="true" in my <s:div> tag.

Thanks.

Owen Berry escribió:
> Javascript within a remote div is not evaluated by default. Not sure
> about s:div, but sx:div has executeScripts which must be set to true.
>
> Owen
>
> On Fri, Sep 5, 2008 at 6:01 AM, Pablo Vázquez Blázquez
> <pvazquez@denodo.com> wrote:
>   
>> Hi!!
>>
>> If I have the following code in a jspx loaded via <s:div>, when I go to
>> another page (also loaded via <s:div>) the "onbeforeunload" event is not
>> triggered. It is only triggered when the page is not loaded using ajax.
>>
>> What can I do to make it works both when the page is downloaded at all from
>> server and when only a part is using ajax (using <s:div> tag)?
>>
>> <jsp:root xmlns="http://www.w3.org/1999/xhtml"
>>   xmlns:jsp="http://java.sun.com/JSP/Page"
>>   xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
>>   xmlns:c="http://java.sun.com/jsp/jstl/core"
>>   xmlns:s="/struts-tags"
>>   xmlns:scheduler="/scheduler-html.tld"
>>   version="2.0">
>>
>> <script type="text/javascript">
>>       onbeforeunload = function() {
>>           if (formIsDirty(document.forms[1])) {
>>               return confirm('Unsaved changes. Do you want to continue?');
>>           }
>>       }
>>   </script>
>>
>> <s:form id="editDataSource" name="editDataSource" theme="ajax"
>>       action="UpdateTagDataSource" method="POST">
>> ...
>> </s:form>
>>
>>  </jsp:root>
>>
>> Thanks.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message