troubleshooting Question

Javascript Button Need OnClick To Reset

Avatar of sharingsunshine
sharingsunshineFlag for United States of America asked on
JavaScriptWeb Development* woo commerce
40 Comments1 Solution573 ViewsLast Modified:
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

<script>
document.getElementById("order_comments").innerHTML = "I want membership";
</script>

<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>
    </span>
</p>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 40 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 40 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros