Jump to content

Mindbody code displays when embeded as a button

Recommended Posts

Site URL: https://www.elementhfp.com/memberships



I have code supplied by Minbody for clients to Login or Register to their account. (Top left of my website) This is set up as a link in the primary navigation of the website. Link works and is functional however, when one opens the webpage the code displays in raw format to the user. 


This is the same case for the pricng links located on the membership page. 


The code used is as follows:

Login | Register:

<script src="https://widgets.mindbodyonline.com/javascripts/healcode.js" type="text/javascript"></script><healcode-widget data-version="0.2" data-link-class="loginRegister" data-site-id="102690" data-mb-site-id="5721400" data-bw-identity-site="false" data-type="account-link" data-inner-html="Login | Register"  />


Sample Link (There are many):

<script src="https://widgets.mindbodyonline.com/javascripts/healcode.js" type="text/javascript"></script><healcode-widget data-version="0.2" data-link-class="healcode-contract-text-link" data-site-id="102690" data-mb-site-id="5721400" data-bw-identity-site="false" data-type="contract-link" data-inner-html="Buy Now" data-service-id="107" />


Does anyone know how I can stop the raw code appearring to website users as the page loads. 


Thanks in advance!

Link to comment

The second thread is not displaying for me (permissions it says). WOuld you have another link?


Here is the URL for the whole thread.


Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 2 weeks later...

No Still no luck with it unfortutely. 

The code in the first like. Seems to disrupt the Mindbody appointment widget and make the date buttons bigger. (I have removed the code and dates revert to original style) 


<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>



  $( ( ) => {
      add mindbody login register link to navigation
      Version    : 0.1d0
      SS Version : 7.1
      By         : Thomas Creedon < http://www.tomsWeb.consulting/ >
    const dataSiteId = '102690';
    const dataMbSiteId = '5721400';
    // do not change anything below, there be the borg here
    $( '<script src="https://widgets.mindbodyonline.com/javascripts/healcode.js" type="text/javascript"><\/script>' +
      '<healcode-widget data-version="0.2" data-link-class="loginRegister" data-site-id="' + dataSiteId + '" data-mb-site-id="' + dataMbSiteId + '" data-type="account-link" data-inner-html="Login | Register" />' )
      .appendTo ( '.header-nav-list, .header-menu-nav-folder-content' );
    $( 'healcode-widget:first' )
      .addClass ( 'header-nav-item header-nav-item--collection header-nav-item--active' )
      .attr ( 'data-animation-role', 'header-element' );
    $( 'healcode-widget:last' )
      .addClass ( 'container header-menu-nav-item header-menu-nav-item--collection' );
    } );

Any idea on a fix? 

Screen shot attached. 


Thanks in advance!image.thumb.png.824ae5ec8c9392966a38f998d2fc1d35.png

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.