I need to include two payment gateways on my site. One gateway to accept USD while another to accept INR (Indian currency). I am planning to include two radio buttons ( 1) USD, 2) INR) on my web page . Now based upon the radio button selection, an appropriate payment gateway (image) should be shown. What is the best way to implement this scenario? (Backend is PHP/MySql)
Something like this. Untested. <script type="text/javascript"> function check() { obj = document.currency.type; value = type.value; alert(value + " was selected"); // the below text that is commented is an example of how to show an iframe based on the selection. // document.getElementById('frame').innerHTML = "<iframe src='payment.html?type="+value+"' />"; } </script> <form name="currency"> <input type="radio" name="type" value="usd" onchange="check" /> USD <input type="radio" name="type" value="INR" onchange="check()" /> INR </form> <span id='frame'></span> Code (markup):
@Cozmic; Do we really need iframe for this? Also what will happen in case Javascript is turned off in a browser? Basically what I am looking for can be seen on this web page https://www.presentermedia.com/ecomm.php?target=registerform&pid=1 I need a similar functionality shown in 3rd category (Payment information)