vendredi 25 septembre 2020

a few checkboxes with a click function to confirmation and after it should display a button for PayPal

my website visitors have to agree to some conditions before they pay. only then should the paypal button appear. unfortunately I don't know how to add multiple buttons to my code. one goes but how others agree? Please help

<head>
    <center><meta charset="utf-8">
    <style type="text/css">
input[type=checkbox],label{
    cursor: pointer;
}
#formdiv{
    padding-top: 30px;
}
    </style>
</head>
<body>


<input type="checkbox"  class= "larger" id="AGB" <name="AGB" <br> <strong></name>AGB</name></strong>

<style>
      input.larger {
        transform: scale(126px);
        margin: 15px;
      }
    </style>
    
    <input type="checkbox"  class= "larger" id="Wid" <name="Widerruf" <br> <strong></name>Widerruf</name></strong>

<style>
      input.larger {
        transform: scale(126px);
        margin: 15px;
      }
    </style>

<center><div id="formdiv">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
        <input type="hidden" name="cmd" value="_s-xclick">
        <input type="hidden" name="hosted_button_id" value="AQPGG3BXQ7JMJ">
        <input type="image" id="submitimage" src="https://www.paypalobjects.com/de_DE/DE/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="Jetzt einfach, schnell und sicher online bezahlen – mit PayPal.">
        <img alt="" border="0" src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif" width="1" height="1">
    </form></center>
</div>

<script>
    function button_klick(ids) {
        if (document.getElementById('AGB').checked) {
            document.getElementById('submitimage').style.width = '126px';
            document.getElementById('submitimage').style.height = '47px';
        }
        else {
            document.getElementById('submitimage').style.width = '0px';
            document.getElementById('submitimage').style.height = '0px';
        }
    }
    document.getElementById('AGB').onclick = function() {
        button_klick();
    };
    button_klick(); // 
</script>

</body>

my website visitors have to agree to some conditions before they pay. only then should the paypal button appear. unfortunately I don't know how to add multiple buttons to my code. one goes but how others agree? Please help




Aucun commentaire:

Enregistrer un commentaire