开发者

Struts2 ajax theme problem in IE9

We have an running application that is developed in struts-2.0.14. In this we used Ajax theme for displaying contents.

This ajax theme is running properly in all browsers except IE9 browsers, In IE9 this ajax theme making problem . The result is showing in new tab instead of showing in target element(div) specified by targets property.

Parent Page

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
        <s:head theme="ajax" debug="false" />
    </head>
    <body>
        <s:url id="changePwd" action="changePassword" />
        <s:div theme="ajax" id="pwdDiv" executeScripts="true" href="%{changePwd}" loadingText="Loading..."/>     
    </body>
</html>

Inner page

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" 开发者_运维问答uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<s:form action="changePassword" id="resetPassword"  name="resetPassword">
    <s:textfield name="username" id="username"  />
    <s:password showPassword="true" name="newpassword" id="newpassword" value="%{newpassword}"/>
    <s:password showPassword="true" name="confirmpassword" id="confirmpassword" value="%{confirmpassword}"/>
    <s:submit value="Confirm"  showLoadingText="false"  onclick="clearMsg();" theme="ajax" targets="pwdDiv" executeScripts="true" cssClass="userbutton" />
</s:form>

When Submitting the form in Inner Page the resulting page is popup into new tab. actually it should replace the content of pwdDiv. Note: the same working properly in other browsers including (IE7,8)

Update: making showLoadingText as true making the request as Ajax but the values are passed as null (password,confirm password ect,. -all fields)


Adding type="button" in s:submit button solve the problem. Don't know what is behind this !

<s:submit **type="button"** value="Confirm"  showLoadingText="false"  onclick="clearMsg();" theme="ajax" targets="pwdDiv" executeScripts="true" cssClass="userbutton" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜