QuoteMachine: Mixed Content Error

I am using the forismatic API to retrieve the Quotes. When I test my code on notepad, the code runs correctly. However, when I try the code on code pen I get a Mixed content Error. My code on codepen is here: https://codepen.io/Ag_Yog/pen/rzezYw.

When using inspect element I get these errors:

Thanks for any help

This is because your are requesting resource from an unsecured/remote domain.

if @SkyC method does not work, try using cross origin like this in your request url

"https://crossorigin.me/http://api.forismatic.com/api/1.0/"

I hope that works for you.

read more about cross origin here

1 Like

hi
What to do here now?
Thanks

This worked for me:

$.getJSON("https://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=jsonp&jsonp=?")
  .done(update)
  .fail(handleErr);

Also remember to logon to Codepen using https://codepen.io

I m stuck on color change page. nothing is working out there. can u please help me?

Unfortunately I had no need for a colour change page in my project, so perhaps somebody else can help you. (I assume you are referring to the Random Quote project?)

Please look at some of the other forums as well.

Was your ‘Mixed Content Error’ resolved?