I have embedded a script in a Wix page that is a widget from TenantTurner. It works correctly in a flat HTML page, and when embedded on a WordPress site, but I can’t get it to work using either the Embed iFrame or Embed Website elements.
Here’s the code:
<!-- Tenant Turner widget --><script id="ttWidget" type="text/javascript">try {window.tenantTurnerSettings = {customer_id: 4386,assigned_to_user_id: null,map: true,default_to_map: false,show_map_and_listings: false,map_height: "600px",map_width: "100%",display_voucher_filter: true,default_sort: "Newest",default_search: "",theme_color: "0d99dd",protocol: window.location.toString().split('://')[0]};} catch (err) { if (console) { console.warn('TT widget error: ' + err); } }</script><script>try {(function () {var w = window;var tt = w.TenantTurner;if (typeof tt !== "function") {var d = document;function l() {var s = d.createElement('script');s.type = 'text/javascript';s.async = true;s.src = (window.tenantTurnerSettings.secure == 'true' ? 'https:' : window.tenantTurnerSettings.protocol == 'https' ? 'https:' : 'http:') + (window.tenantTurnerSettings.env_scripts ? window.tenantTurnerSettings.env_scripts + '/widget/widget.js' : '//app.tenantturner.com/widget/widget.js');var x = d.getElementById('ttWidget');x.parentNode.insertBefore(s, x);}if (w.attachEvent) {w.attachEvent('onload', l);} else {w.addEventListener('load', l, false);}}})()} catch (err) {if(console){console.log('TT widget error: ' + err)}}</script><!-- end Tenant Turner widget -->
Here’s the WordPress page with the embed that works:
Here’s the Wix page with the embed that doesn’t work:
https://randerson1101.wixsite.com/website/blank-page
I don’t see any Javascript Errors, so I don’t have a clue why this isn’t working in Wix.
Any ideas?
Thanks!
Phil