- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
1 of 2 embedded code elements running on published site
When I am in the site editor, the 2 html scripts run just fine and do what they are supposed to do but when I publish the site and head to the page, only 1 element shows up and there is nothing displayed for the other element. Included screenshots in editor and the published page. Also, here is the code running (which runs fine in any html editor):
<!DOCTYPE html> <html> <body onload="loadDoc()"> <div id="info"> </div> <script> function loadDoc() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { var info = JSON.parse(this.responseText); var launches = info.launches[0]; var mission = launches.missions[0]; var detail = mission.description; document.getElementById("info").innerHTML = detail; } }; xhttp.open("GET", "https://launchlibrary.net/1.4.1/launch?agency=121&next=1&mode=verbose", true); xhttp.send(); } </script> </body> </html>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report

- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Beginners Guide to (almost) Everything SpaceX - https://spacex-guide.weebly.com/
Specific page: https://spacex-guide.weebly.com/mission-control-wip.html
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Also, I have an image stored in the theme and it doesn't load on the published page
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report

- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
You have SSL enabled on your site, but the scrip is referencing http. I think if you change the urls in the script to https they should show. Or you will need to generate new code somewhere. What page is the missing image on?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
None of my scripts request an http source; they all request https sources. The image is under the Assets folder and it loads in the editor, but not on the published page.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report

- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
The code for your image seems to be using http. I'm not sure if that's the root cause of why it isn't display, but it's possible. For your other code are you including the HTML and BODY tags in your embed code element?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Thanks for catching that. I changed it to https but it still won't load on the publsihed page (Image is at the link I point to: https://spacex-guide.weebly.com/files/theme/Patch_Coming_Soon.jpg). All the scripts do have HTML and Body tags. I tried the scripts on another provider and they all loaded fine. Could there be a limitation Weebly has for free sites for how many embedded code elements can run on one page?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
All the scripts can run fine when they are the only ones on the page. But when multiple are on the page, it bugs out.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Sounds like they don't play well together. Maybe you could put them on different pages?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
I have everything working now. Each script was requesting an API at the same time. Now one script requests all the info and sends that info to defined <div> and <p> in the page
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Ah, that makes sense. Nice fix!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report