I have this html where I need to make payment to payment gateway.
<html>
<head></head>
<body>
<form id="pay_form" method="post">
<div className="text-center">
<div style="text-align:center;max-width:1170px;margin:0 auto;"></div>
<input type="hidden" name="MerchantId" id="MerchantId"/>
</div>
</form>
</body>
<script>
CheckOut();
function CheckOut() {
document.getElementById("pay_form").action = "<%= requestUrl %>";
document.getElementById("MerchantId").value = "<%= merchantId %>";
document.getElementById("pay_form").submit();
}
</script>
</html>
If I do window.open('myhtml.html');
the html will execute the script and submit the form but how to bind the MerchantId
value to it before that?