Avatar of sharingsunshine
Flag for United States of America

asked on 

Javascript Button Need OnClick To Reset

I have a javascript button at https://www.theherbsplace.com/rebate-program/ it is found at the bottom of the page. The button state is being carried over to every customer.  I need to make sure if someone doesn't want membership that the message doesn't show up that they do.

This is a WooCommerce site version 3.5.4 running Wordpress 4.9.8.  Also, I am using the theme Flatsome 3.7.2.

Here is the code

document.getElementById("order_comments").innerHTML = "I want membership";

Open in new window

<p><a class="button exclusive biz-op-button" title="I Want Membership!" href="#" data-register="true">Get My Membership</a></p>
<p class="form-row notes" id="order_comments" data-priority="">
    <label for="order_comments" class="">Order notes&nbsp;<span class="optional">(optional)</span></label>
    <span class="woocommerce-input-wrapper">
        <textarea name="order_comments" class="input-text " id="order_comments" placeholder="Notes about your order, e.g. special notes for delivery." rows="2" cols="5"></textarea>

Open in new window

Web Development* woo commerceJavaScript

Avatar of undefined
Last Comment
Julian Hansen

8/22/2022 - Mon