JSFiddle - React, Tailwind, and code Playground

by hslincoln

HTML

<div class="signUpEmails">
    <h1>Sign Up For Emails</h1> 
    <p>To complete your sign up to receive
        <venda_ebizname>email updates on the latest products and promotions, please follow the instructions below:</p>
    <form name="emailsonly" method="post" action="<venda_codehttp>">
        <input type="hidden" name="ex" value="tl_user-procmyform">
        <input type="hidden" name="page" value="thankyou">
        <input type="hidden" name="log" value="">
        <input type="hidden" name="bsref" value="<venda_bsref>">
        <input type="hidden" name="emlonly" value="1">
        <input type="hidden" name="usemail" value="">
        <input type="hidden" name="layout" value="1column">
        <div>
            <p id="newsignup">
                <!-- notify for new signup user-->
            </p>
            <p id="alreadysignup">
                <!-- notify for already signup user -->
            </p>
            <p id="reenteremail">
                <!-- re-enter email address-->
            </p>
        </div>
        <script language="JavaScript" type="text/javascript">
            var userEmail = Venda.Platform.getUrlParam(location.href, 'email');
            var displyEmail = Venda.Platform.escapeHTML(userEmail);
            var sesUsEmail = '<venda_userinfo><venda_sesusemail></venda_userinfo>';
            var userType = '<venda_ustype>';
            if ((sesUsEmail == userEmail) || (sesUsEmail == '')) {
                document.emailsonly.usemail.value = userEmail;
                document.getElementById("newsignup").innerHTML = 'Click <strong>Continue</strong> to sign up: <strong>' + displyEmail + '</strong>';
            } else {
                document.emailsonly.usemail.value = userEmail;
                document.emailsonly.log.value = '4';
                if (userType != 'G') {
                    document.getElementById("alreadysignup").innerHTML = 'You are already signed up as: <strong>' + sesUsEmail + '</strong>, only click...