Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Mindbody code displays when embeded as a button


Brian55

Question

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

Hello,

 

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
  • Answers 4
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

4 answers to this question

Recommended Posts

  • 0

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) 

Header: 

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

Footer: 

<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' );
      
    } );
    
  </script>

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...