112 posts CoralixThemes
  • Elite Author
  • Most Wanted Bounty Winner
  • Referred between 10 and 49 users
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Has been a member for 1-2 years
  • Bought between 1 and 9 items
  • Envato Studio (Microlancer) Beta Tester
  • United States
CoralixThemes says

Hi guys,
I need some help! My last work has a problem with Themeforest top bar. For some reason the demo is working fine but when I try to see the preview (which includes Themeforest top bar some scripts stop working). Any idea?
Themeforest item: http://themeforest.net/item/candidate-political-donation-landing/7143739
Demo here: http://candidate.coralixthemes.com/

1090 posts The Last Man Standing
  • Elite Author
  • Author had a Free File of the Month
  • Has been a member for 3-4 years
  • Referred between 10 and 49 users
  • Exclusive Author
  • Bought between 10 and 49 items
  • Sold between 50 000 and 100 000 dollars
  • Beta Tester
ImanGM says

Hi,

I guess it’s because some JS codes are not permitted to load when your site is loaded in an iframe from another domain name than your site.

This is why I’ve removed the default ThemeForest top bar on my latest item with one on my own host.

Hope this helps.

Cheers,
Iman

1070 posts
  • Forum Superstar
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Referred between 50 and 99 users
  • Europe
  • Has been a member for 3-4 years
  • Exclusive Author
+1 more
Smartik says
Remove the iframe. Add this in the header of your template.
<script>if ( top !== self ) top.location.replace( self.location.href );</script>
112 posts CoralixThemes
  • Elite Author
  • Most Wanted Bounty Winner
  • Referred between 10 and 49 users
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Has been a member for 1-2 years
  • Bought between 1 and 9 items
  • Envato Studio (Microlancer) Beta Tester
  • United States
CoralixThemes says

Hi, Thank for your help. I try this with my custom top bar but it didn’t work. :(


Hi,

I guess it’s because some JS codes are not permitted to load when your site is loaded in an iframe from another domain name than your site.

This is why I’ve removed the default ThemeForest top bar on my latest item with one on my own host.

Hope this helps.

Cheers,
Iman
112 posts CoralixThemes
  • Elite Author
  • Most Wanted Bounty Winner
  • Referred between 10 and 49 users
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Has been a member for 1-2 years
  • Bought between 1 and 9 items
  • Envato Studio (Microlancer) Beta Tester
  • United States
CoralixThemes says

Thank you so much. It works! You save my day :)


Remove the iframe. Add this in the header of your template.
<script>if ( top !== self ) top.location.replace( self.location.href );</script>
by
by
by
by
by
by