Struts2 - Open page in same tab

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Struts2 - Open page in same tab

Deborah White
I have a page that is opening a new tab instead of the same tab.  Since I am somewhat new to jquery, ajax and struts, I'm wondering if someone can help me.


I have this in my jsp:

function continueToNext() {
              document.getElementById("payByCheck").value = payByCheck;
        $('#StatusMessage').html("<img src='web/images/busySmall.gif'>");
        document.getElementById("button_next").disabled = "disabled";
        document.getElementById("next1").disabled = "disabled";
        var url = "<s:url value="renewsave.action" encode="true"/>";
            document.regSubmitForm.method ="POST";
            document.regSubmitForm.action = url;
            document.regSubmitForm.submit();
    }

<center><input id="button_next" class="button" type="button" value="Next" name="button_next" onclick="continueToNext()"/></center>
                        <center><input id="next1" class="button" type="button" value="Next" name="next1" style="display:none" onclick="continueToNext()"/></center>
                    <div id="requirementsHelp"></div>

In struts.xml:

<action name="renewsave" class="gov.ca.doj.sotas.action.renew.ExtRenewSave">
              <result name="success">/WEB-INF/jsp/renewSaveESignature.jsp</result>
              <result name="InternalRenew">/WEB-INF/jsp/renewSave.jsp</result>
              <result name="renewEsignProc">/WEB-INF/jsp/eSignRenewProcReview.jsp</result>
             <result name="renewSave1">/WEB-INF/jsp/renewSaveEPay.jsp</result>
             <result name="renewSave2">/WEB-INF/jsp/renewSave.jsp</result>
             <result name="input">/WEB-INF/jsp/renewReview.jsp</result>
             <result name="error">/WEB-INF/jsp/sotasExternalHome.jsp</result>
        </action>

CONFIDENTIALITY NOTICE: This communication with its contents may contain confidential and/or legally privileged information. It is solely for the use of the intended recipient(s). Unauthorized interception, review, use or disclosure is prohibited and may violate applicable laws including the Electronic Communications Privacy Act. If you are not the intended recipient, please contact the sender and destroy all copies of the communication.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Struts2 - Open page in same tab

Lukasz Lenart
Hi,

Please post such questions to the Struts User Mailing list, the Dev
list is used to discuss development of the framework itself.
http://struts.apache.org/mail.html

Check if your form definition contains attribute "target"


Regards
--
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2017-08-10 21:44 GMT+02:00 Deborah White <[hidden email]>:

> I have a page that is opening a new tab instead of the same tab.  Since I am somewhat new to jquery, ajax and struts, I'm wondering if someone can help me.
>
>
> I have this in my jsp:
>
> function continueToNext() {
>               document.getElementById("payByCheck").value = payByCheck;
>         $('#StatusMessage').html("<img src='web/images/busySmall.gif'>");
>         document.getElementById("button_next").disabled = "disabled";
>         document.getElementById("next1").disabled = "disabled";
>         var url = "<s:url value="renewsave.action" encode="true"/>";
>             document.regSubmitForm.method ="POST";
>             document.regSubmitForm.action = url;
>             document.regSubmitForm.submit();
>     }
>
> <center><input id="button_next" class="button" type="button" value="Next" name="button_next" onclick="continueToNext()"/></center>
>                         <center><input id="next1" class="button" type="button" value="Next" name="next1" style="display:none" onclick="continueToNext()"/></center>
>                     <div id="requirementsHelp"></div>
>
> In struts.xml:
>
> <action name="renewsave" class="gov.ca.doj.sotas.action.renew.ExtRenewSave">
>               <result name="success">/WEB-INF/jsp/renewSaveESignature.jsp</result>
>               <result name="InternalRenew">/WEB-INF/jsp/renewSave.jsp</result>
>               <result name="renewEsignProc">/WEB-INF/jsp/eSignRenewProcReview.jsp</result>
>              <result name="renewSave1">/WEB-INF/jsp/renewSaveEPay.jsp</result>
>              <result name="renewSave2">/WEB-INF/jsp/renewSave.jsp</result>
>              <result name="input">/WEB-INF/jsp/renewReview.jsp</result>
>              <result name="error">/WEB-INF/jsp/sotasExternalHome.jsp</result>
>         </action>
>
> CONFIDENTIALITY NOTICE: This communication with its contents may contain confidential and/or legally privileged information. It is solely for the use of the intended recipient(s). Unauthorized interception, review, use or disclosure is prohibited and may violate applicable laws including the Electronic Communications Privacy Act. If you are not the intended recipient, please contact the sender and destroy all copies of the communication.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...