Sending a form through Javascript IE7 Problem
I am开发者_如何学编程 using the following code to send a form:
<script type="text/javascript">
window.onload = function() { document.form1.submit(); }
</script>
The code for the form is below:
<div id="donationWorldPay"><form id="form1" name="donation_form1" action="https://secure.wp3.rbsworldpay.com/wcc/purchase" method="post" target="_blank" >
<input type="hidden" name="instId" value="11111" />
<input type="hidden" name="cartId" value="1" />
<input type="hidden" name="currency" value="GBP" />
<input type="hidden" name="amount" value="'.$amount.'" />
<input type="hidden" name="desc" value="'.$donationType.' Gift Aid ='.$giftAid.'" />
</form></div>
Its works in FF, Safari, chrome and even IE8. But can't seem to get it working in IE7. The form sends to the right page in ie7 but no $_POST values are sent.
Thanks in Advance
Try changing the code to:
document.forms["form1"].submit();
Assuming form1
is the name of the form it should work.
If still no luck please answer the questions in my comment on your original question.
精彩评论