Javascript 限制响应时间上的url更改
当前我的应用程序url显示在浏览器地址栏中。在我的页面上,我有一个指向外部网站的链接。当我点击该链接时,它会链接到他们的网站,并返回一个响应链接/url,从而重定向到我的页面。但此时url被更改为本地路径,并在下一个过程中显示所有操作名称和令牌查询值 例如:假设我的url是http://www.testsecure.com,从这个页面,我向一些外部网站发送请求,并获得对我重定向url的响应。该重定向url是一个jsp页面,因此它被重定向,url地址栏作为jsp文件路径被更改。我需要限制这些事情 我希望你能理解我的问题。如果您有任何澄清,我将更详细地解释 Sapmle jsp:Javascript 限制响应时间上的url更改,javascript,jsp,request,response,Javascript,Jsp,Request,Response,当前我的应用程序url显示在浏览器地址栏中。在我的页面上,我有一个指向外部网站的链接。当我点击该链接时,它会链接到他们的网站,并返回一个响应链接/url,从而重定向到我的页面。但此时url被更改为本地路径,并在下一个过程中显示所有操作名称和令牌查询值 例如:假设我的url是http://www.testsecure.com,从这个页面,我向一些外部网站发送请求,并获得对我重定向url的响应。该重定向url是一个jsp页面,因此它被重定向,url地址栏作为jsp文件路径被更改。我需要限制这些事情
<script type="text/javascript">
function formSubmit()
{
document.newForm.submit();
}
</script>
<bean:define name="newForm" property="sessionKey" id="sessionKey"/>
<bean:define name="newForm" property="FirstName" id="FirstName"/>
<bean:define name="newForm" property="LastName" id="LastName"/>
<bean:define name="newForm" property="Address1" id="Address1"/>
<bean:define name="newForm" property="AddressCity" id="AddressCity"/>
<bean:define name="newForm" property="Phone" id="Phone"/>
<bean:define name="newForm" property="payoutAmount" id="payoutAmount"/>
<bean:define name="newForm" property="Email" id="Email"/>
<bean:define name="newForm" property="AddressZip" id="AddressZip"/>
<bean:define name="newForm" property="AddressState" id="AddressState"/>
<bean:define name="newForm" property="AddressCountry" id="AddressCountry"/>
<form name="newForm" action="https://www.debitway.ca/process/index.php" method="POST">
<input type="hidden" name="sessionKey">
<input type="hidden" name="xpin">
<input type="hidden" name="FirstName">
<input type="hidden" name="LastName">
<input type="hidden" name="Address1">
<input type="hidden" name="AddressCity">
<input type="hidden" name="Phone">
<input type="hidden" name="payoutAmount">
<input type="hidden" name="Email">
<input type="hidden" name="Phone">
<input type="hidden" name="AddressState">
<input type="hidden" name="AddressZip">
<input type="hidden" name="AddressCountry">
<input type="hidden" name="return_url" value="http://testsecure/ResponsePage.jsp">
<input type="hidden" name="first_name" value="<%=FirstName%>"/>
<input type="hidden" name="last_name" value="<%=LastName%>"/>
<input type="hidden" name="email" value="<%=Email%>"/>
<input type="hidden" name="phone" value="4574745745745474"/>
<input type="hidden" name="item_code" value="<%=sessionKey%>"/>
<input type="hidden" name="custom" value="321">
<input type="hidden" name="shipment" value="no">
<input type="hidden" name="address" value="hdhdhd">
<input type="hidden" name="city" value="hfdhfd">
<input type="hidden" name="state_or_province" value="fhdhfd">
<input type="hidden" name="zip_or_postal_code" value="64646">
<input type="hidden" name="country" value="<%=AddressCountry%>">
</form>
<Script>
formSubmit();
</Script>
在这个jsp中,我有一个返回url参数。这是获取响应后返回的url。在发送请求之前,我的url为。如果我正在处理应用程序中的所有操作,它将保持不变。但就这一部分而言,我的url在收到响应后会发生变化http://testsecure/ResponsePage.jsp.. 我需要避免这个url更改。即使在收到回复后,我也需要将我的url维护为http://www.testsecure.com. 这可能吗?我唯一想让你解释的是你的问题。我也不明白。为什么不指定一个更简单的重定向URL?你能举个例子吗?对不起,我也不明白。显示一些代码+示例