爲什麼在ASP經典的Select Case分支中不會彈出JavaScript警報? 當我放入Response.End語句並運行結帳過程時,JavaScript警報會執行它們的操作..但是當我將它們取出並且緊接着是重定向時...警報不會彈出。任何想法爲什麼?爲什麼不會在ASP經典的Select Case分支中彈出JavaScript警報?
If strResponse <> "000" Then
Select Case strResponse
Case "701"
%>
<script type="text/javascript">
alert("The customer is under 18 years of age based upon the date of birth.");
</script>
<%
'Response.End
Response.Redirect strRedirectCheckout
Case "702"
%>
<script type="text/javascript">
alert("The billing address is outside the United States.");
</script>
<%
'Response.End
Response.Redirect strRedirectCheckout
Case "707"
%>
<script type="text/javascript">
alert("The account holder does not have sufficient credit available for the transaction amount.");
</script>
<%
'Response.End
Response.Redirect strRedirectCheckout
Case Else
%>
<script type="text/javascript">
alert("Unable to obtain an authorization\nClick OK to be redirected back to checkout and please choose another form of payment");
</script>
<%
'Response.End
Response.Redirect strRedirectCheckout
End Select
Else ' if strResponse does == '000'; SUCCESS!!!
這工作像一個魅力。謝謝。 – JoJo 2012-04-27 16:01:32