Rank: Member
Joined: 5/5/2009(UTC) Posts: 1
|
Help!
I want to use the ShareThis button on my website, but it is causing errors in IE on the SSL-enabled pages in the website because the widget doesn't support https. the code for the button is below:
<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js# publisher=ef3276f9-7789-478a-be70-bb926873e5d2; tabs=email%2Cweb%2Cpost& charset=utf-8& style=rotate& color=#ffffff& buttonText=Share This Deal!& "> </script>
I inserted the code in my header file, so the button would be present on every part of my site. Now I need to find out how to disable the button on individual pages that are https, or find a way to make it work without causing SSL warnings in Internet Explorer. I'm a newbie on Javascript too, so I'm stuck. Any ideas?
|
|
|
|
Rank: Member
Joined: 9/26/2008(UTC) Posts: 121
|
Hi, I'm not sure it will help but try to change scr="http://... to src="https://.
Regards |
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Yeah, that's definitely the problem. Any time you reference an asset (CSS, JS, image, etc) with a fully-qualified URL (i.e. http://) from a secure page, IE will throw that warning. It's really quite annoying. The solution is to either always use https:// for the URL or add some smarts to the code so it conditionally changes it. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 12/23/2003(UTC) Posts: 909
|
i've been digging around for it, i recall one time adding a comodo corner of trust logo to appear on all pages and it was simple if then check to use http:// or https://
on a sidenote, purely my opinoin, i don't think you should be "sharing" SSL pages anyway. I would consider placing the addthis on product pages, category pages, homepage and secondary content pages only. |
|
|
|
|
Rank: Member
Joined: 4/29/2010(UTC) Posts: 256
Thanks: 4 times Was thanked: 11 time(s) in 10 post(s)
|
Originally Posted by: "Aaron" Yeah, that's definitely the problem. Any time you reference an asset (CSS, JS, image, etc) with a fully-qualified URL (i.e. http://) from a secure page, IE will throw that warning. It's really quite annoying. The solution is to either always use https:// for the URL or add some smarts to the code so it conditionally changes it. Another way for doing this with very little effort is to omit the http or https e.g. //ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js all browsers even IE 6 will inherit the protocol from the page so it will work across browses with no code to maintain.
|
|
|
|
Rank: Member
Joined: 4/29/2010(UTC) Posts: 256
Thanks: 4 times Was thanked: 11 time(s) in 10 post(s)
|
Oops didn’t realise I dragged this post up from the depths of the forum sorry.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.