How do I get this code to work on an https site?

Code Works [Playlist appears after you click on it.]
http://testpage34567.blogspot.com/

Code Doesn’t Work [When you click on it nothing appears.]
https://testpage34567.blogspot.com/

<div style="width:0;" onclick="myscr3=document.getElementById('myscroll3'); myscr3.style.display='block'; this.style.display='none'">

<a href="http://makeavoice.com/shoutcast/websitecodes/songhistory.php?ip=hi5.1980s.fm&amp;port=80&amp;refresh=50&amp;fontcolor=0059dd&amp;bgcolor=000000" style="cursor: pointer;display:block; width: 260px; height: 144px; background: #000; border: 3px solid transparent; border-image:linear-gradient(to right, #f0f 0px, #f0f 184px,#fff 0px, #fff 192px, #0ff 0px, #0ff 100% ); border-image-slice: 1; background-color:transparent; font-family:Tahoma; font-weight: bold;font-size:30px; color:#0059dd;text-align: center;line-height:100px;text-decoration: none;" target="frame3">Song History</a></div>

<div id="myscroll3" style="display: none;">
<iframe style="display:block;border:0;" name="frame3" width="266" height="150" ></iframe>
</div>

Using the debugger on the two pages revealed the following:

Both pages call an unsecured history-page and the SSL page refuses to load the unsecured history-page.

I tried changing history-page link to SSL but it is not registered.

Possible solutions:

  1. request the history-page site to update to SSL
  2. use .htaccess to only display your Non-SSL page
  3. find a SSL site that supplies the same history-page functionality

HTTP - WORKS OK
This endpoint should be made available over a secure connection.
http://testpage34567.blogspot.com
Mixed Content: The page at ‘https://www.blogger.com/navbar.g?targetBlogID=3058795618125674402&blogName=…e&parent=http%3A%2F%2Ftestpage34567.blogspot.com&pfname=&rpctoken=39882612
was loaded over a secure connection,
but contains a form which targets an insecure endpoint
http://testpage34567.blogspot.com/search’.


> **HTTPS - FAILED** because unsecured http page not accepted This request has been blocked; the content must be served over HTTPS. https://testpage34567.blogspot.com Mixed Content: The page at 'https://testpage34567.blogspot.com/' was loaded over HTTPS, but requested an insecure resource 'http://makeavoice.com/shoutcast/websitecodes/songhistory.php?ip=hi5.1980s.fm&port=80&refresh=50&fontcolor=0059dd&bgcolor=000000'.
3 Likes

Does anyone have any solutions that I can implement in the code itself so it works on an https site?

You seem to have misunderstood the problem, which @John_Betong explained here:

Your page is using https, and will not load any resources which don’t use https. (That makes sense, if you think about it. You can’t serve a “secure” page if parts of it are not secure.)

So your choices are as John said:

  • find an alternative source to link to, which does use https;

  • keep using the source you have at the moment and change your own site to stop using https
    or

  • request that the original site provides an https version.

5 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.