No, that your added line do nothing with close button at last page I
think. close button at last page has been generated by the result of
then action `renewsave`, I guess. So just see what jsp is the result of
this action and so, what is the script on that close button's onClick
and then you should correct that script I think.
Regards,
Yasser.
On 8/15/2017 12:34 AM, Deborah White wrote:
> So I got that part working but now my close button on the last page does not
> work. I have found several things online that say it is a security feature.
> Please see my previous email. I will post to users from now on, I just get a
> lot of people that don't really take the time to understand what I am trying
> to do. I see it is not a struts issue, but if you have any thoughts that
> would be great.
>
> I did this, maybe there is something better that will then make my close
> button work on next page:
>
> function continueToNext() {
> document.getElementById("payByCheck").value = payByCheck;
> $('#StatusMessage').html("<img src='web/images/busySmall.gif'>");
> Added this ** document.getElementById("regSubmitForm").target = "_self";
> 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();
> }
>
> -----Original Message-----
> From: Yasser Zamani [mailto:[email protected]]
> Sent: Saturday, August 12, 2017 12:12 AM
> To: [email protected]
> Cc: Deborah White <[email protected]>
> Subject: Re: FW: Struts2 - Open page in same tab
>
> Hello,
>
> Sorry for late answer. I thought dev mailing list also receives user mails
> but now I subscribed to user mailing list and I have your mails on my radar
> hereafter.
>
> Although this is not a Struts issue, I reviewed your jsp and I think if your
> submitEPay function works and opens a popup window, but it's next button does
> not work, then you may rewrite continueToNext function as below:
>
> 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"/>"; // I
> added following one line document.regSubmitForm.target = 'ePayment';
> document.regSubmitForm.method ="POST";
> document.regSubmitForm.action = url;
> document.regSubmitForm.submit();
> }
>
>
> On 8/11/2017 8:58 PM, Deborah White wrote:
>> Hello, you are the only person who has been able to help me so far. I'm
>> hoping you can help me with one more item. I have the jsp below and you
>> will see there is an option for epay which pops up a window to our vendor.
>> The form then loses focus so when you return to it and click the next
>> button, it opens in a new tab instead of the same tab. This is confusing
>> for people because the second tab then has a confirmation and a close button
>> which closes that tab, but then the other (with this code) is still open.
>> Any ideas?
>>
>> -----Original Message-----
>> From: Deborah White
>> Sent: Thursday, August 10, 2017 1:11 PM
>> To: 'Struts Users Mailing List' <[email protected]>
>> Subject: RE: Struts2 - Open page in same tab
>>
>> <%@ page language="java" contentType="text/html; charset=UTF-8"
>> pageEncoding="UTF-8"%> <%@taglib uri="/struts-tags" prefix="s" %>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head>
>> <jsp:include page="/WEB-INF/jsp/extHead.jsp"/> <script
>> language="javascript"> $(document).ready( function() {
>> var ePayAmount = "<s:property value="#session.epay.amount"
>> escape="false" escapeJavaScript="true"/>"
>> if ( ePayAmount <= 0 ) {
>> $("#next1").show();
>> }
>> $("#mailInfo").hide();
>> $("button, input:button", ".holder" ).button();
>> initPageSessionTracker('<s:property
>> value="#session.maxInactiveInterval"/>');
>> //$("#button_next").hide();
>>
>> });
>>
>> var payByCheck = -1;
>>
>> function submitEPay()
>> {
>> payByCheck = 0;
>>
>> $("#mailInfo").hide();
>> $("#button_next").show();
>> var page = '<s:url value="/loading.html" encode="true"/>'
>> popWin(page,'ePayment',700,1020,false);
>> document.regSubmitForm.method ='GET';
>> document.regSubmitForm.action =
>> document.getElementById('url').value;
>> document.regSubmitForm.target = 'ePayment';
>> document.regSubmitForm.submit();
>> window.focus();
>> }
>>
>> function doClear()
>> {
>> document.regSubmitForm.reset();
>> var tbl = document.getElementById('aka');
>> var rowLength = tbl.rows.length;
>> for (var i = (rowLength-2); i >= 2; i--)
>> {
>> tbl.deleteRow(i);
>> }
>> akaNumber = 1
>> return false;
>> }
>>
>> function document_onkeypress(e)
>> {
>> var keynum;
>> if(window.event)
>> {
>> keynum = window.event.keyCode;
>> }
>> else if(e.which)
>> {
>> keynum = e.which;
>> }
>> if(keynum == "13")
>> {
>> submitForm();
>> }
>> }
>>
>> function openFeeSlip(){
>> window.open('<s:url value="viewFeeSlip.action"
>> encode="true"/>','reportwindow','width=800,height=600,toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes');
>> }
>>
>> 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();
>> }
>>
>> function byCheck() {
>> $("#mailInfo").show();
>> $("#button_next").show();
>> payByCheck = 1;
>> }
>>
>> </script>
>> </head>
>> <body>
>> <form name="regSubmitForm" id="regSubmitForm" ENCTYPE="multipart/form-data"
>> action="" target="_self">
>> <div class="wrapper">
>> <div id="header">
>> <div id="skiptocontent">
>> <a href="#skipToContent">Skip to content</a>
>> </div>
>> </div>
>>
>> <div id="navContainer">
>> <jsp:include page="/WEB-INF/jsp/extNav.jsp"/>
>> </div>
>> <div class="holder"><a name="skipToContent"></a>
>> <div id="container">
>> <div id="leftNav">
>> <h2 class="features">Tools & Resources</h2>
>> <div class="programLinks">
>> <ul>
>> <li>
>> <jsp:include
>> page="/WEB-INF/jsp/registrationFaqCall.jsp"/>
>> </li>
>> </ul>
>> </div>
>> </div>
>>
>> <div id="middleColumn">
>> <h1 class="page-title"></h1>
>> <div class="clientSideError"
>> id="clientSideError"></div>
>> <fieldset style="width:650px">
>> <legend>Fees</legend>
>> <s:if test='#session.epay.amount > 0'>
>> <table cellspacing="0" cellpadding="0"
>> border="0" width="100%">
>> <tr>
>> <td colspan="2" align="left">
>> <br/>
>>
>> <label class="red">
>>
>> <b>
>>
>> A $6.95 convenience fee is required for
>> all online payments (*All online payments are nonrefundable).
>>
>> </b>
>>
>> </label>
>>
>> </td>
>>
>> </tr>
>> <tr>
>> <td>
>> <br/><ul>
>> <li>
>> <label> To make a
>> payment by credit card or electronic check, click on the button to the
>> right.</br>
>> We accept Visa,
>> MasterCard, and Discover, Electrical Check(ACH).</label></br></br>
>> </li>
>> </ul>
>> </td>
>> <td align="right">
>> <input id="button_epay"
>> class="button" type="button" value="E-Pay" name="button_epay"
>> onclick="submitEPay();" />
>> </td>
>> </tr>
>> <tr>
>> <td colspan="2"
>> align="center"><label><b><br/> OR <br></b></label></td>
>> </tr>
>> <tr>
>> <td>
>> <ul>
>> <li>
>> <label
>> style="margin-top: 20px;">
>> To confirm
>> payment by mail, click on the button to the right.
>> <!-- <a href="#"
>> onclick="openFeeSlip();"><label class="linkTextCSS">fee slip</label></a> -->
>> </label>
>> </li>
>> </ul>
>> </td>
>> <td>
>> <input type="button"
>> id="btnCheck" class="button" name="btnCheck" value="Check"
>> onclick="byCheck();" />
>> <input type="hidden"
>> id="payByCheck" name="payByCheck" value= "-1" />
>> </td>
>> </tr>
>> </table>
>> <table id="mailInfo" name="mailInfo"
>> cellspacing="0" cellpadding="0" border="0" width="100%">
>> <tr>
>> <td colspan="2" align="center">
>> <label>
>> <b>
>> <br/></br/>
>> Seller of Travel
>> Program<br>
>> Office of The
>> Attorney General<br>
>> Department of
>> Justice<br>
>> 300 South Spring
>> Street, Suite 1702<br>
>> Los Angeles, CA
>> 90013-1230
>> </b>
>> </label>
>> </td>
>> </tr>
>> </table>
>> <table>
>> <tr>
>> <td colspan="2" align="left">
>> <label>
>> <b>
>> <br/>
>> *Registration fees
>> and the $6.95 convenience fee are nonrefundable.
>> </b>
>> </label>
>> </td>
>> </tr>
>> </table>
>> </s:if>
>> <s:else>
>> <s:if test='#session.epay.feesPaid ==
>> #session.epay.feesDue && #session.epay.feesPaid > 0'>
>> <table cellspacing="0"
>> cellpadding="0" border="0" width="100%">
>> <tr>
>> <td colspan="2">
>> <ul>
>> <li>
>> <label
>> style="margin-top: 20px;">
>> You have no
>> fee due at this time.
>> </label>
>> </li>
>> </ul>
>> </td>
>> </tr>
>> </table>
>> </s:if>
>> <s:else>
>> <table cellspacing="0"
>> cellpadding="0" border="0" width="100%">
>> <tr>
>> <td colspan="2">
>> <ul>
>> <li>
>> <label
>> style="margin-top: 20px;">
>> Please
>> contact the Seller of Travel Program to discuss fee payment.
>> </label>
>> </li>
>> </ul>
>> </td>
>> </tr>
>> <tr>
>> <td colspan="2"
>> align="center">
>> <label>
>> <b>
>> <br>
>> Email:
>> [email protected]
>> </b>
>> </label>
>> </td>
>> </tr>
>> <tr>
>> <td colspan="2"
>> align="center">
>> <label>
>> <b>
>> <br>
>> Phone: (213)
>> 897-8065
>> </b>
>> </label>
>> </td>
>> </tr>
>> </table>
>> </s:else>
>> </s:else>
>> <input type="hidden" name="UniqueID"
>> id="UniqueID" value="<s:property value="#session.epay.UniqueID"/>" />
>> <input type="hidden" name="Amount"
>> id="Amount" value="<s:property value="#session.epay.Amount"/>" />
>> <input type="hidden" name="Passcode"
>> id="Passcode" value="<s:property value="#session.epay.Passcode"/>" />
>> <input type="hidden" name="ClientID"
>> id="ClientID" value="<s:property value="#session.epay.ClientID"/>" />
>> <input type="hidden" name="ID" id="ID"
>> value="<s:property value="#session.epay.ID"/>" />
>> <input type="hidden" name="url" id="url"
>> value="<s:property value="#session.epay.url"/>" />
>> </fieldset>
>> <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>
>> <input type="hidden" name="nextsection" id="nextsection"
>> value="-2"/>
>> <input type="hidden"
>> name="renewSaveStart" id="renewSaveStart" value="0"/>
>> <input type="hidden"
>> name="esignStart" id="esignStart" value="0"/>
>> </div>
>> </div>
>> <br>
>> </div>
>> <div class="footer">
>> <jsp:include page="/WEB-INF/jsp/extFooter.jsp"/>
>> </div>
>> </div>
>> </form>
>> </body>
>> </html>
>>
>> -----Original Message-----
>> From: Lukasz Lenart [mailto:[email protected]]
>> Sent: Thursday, August 10, 2017 1:02 PM
>> To: Struts Users Mailing List <[email protected]>
>> Subject: Re: Struts2 - Open page in same tab
>>
>> Please post the whole form or at lease form definition
>>
>>
>> Regards
>> --
>> Ćukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>>
>> 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.
>>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]