localendar Forums Homepage

Print at Mar 20, 2018, 12:10:30 PM View all posts in this thread on one page
Posted by halomotaf at Sep 7, 2014, 9:42:07 PM
embed mini-cal after dom loaded
i am embedding the mini cal in my site' and it takes too much time to load, and preventing the site itself from being loaded
so i tried to load the calendar only after dom loaded, and didn't find how

could you help please ?


Posted by jasonsullivan at Sep 11, 2014, 1:16:39 AM
Re: embed mini-cal after dom loaded
Could you provide a link to the page on your site where it is embedded?
Jason Sullivan
Support Associate

Posted by halomotaf at Sep 20, 2014, 9:02:28 PM
Re: embed mini-cal after dom loaded

Posted by support at Sep 22, 2014, 11:09:04 PM
Re: embed mini-cal after dom loaded
This is just a thought I had...
First, in the two places you include <script> tags supplied by localendar, replace them with something like this:
<div id="placeholder1">&nbsp;</div>
<div id="placeholder2">&nbsp;</div>

Then at the bottom of your page, try something like this:

var script1 = document.createElement('script');
script1.src = "http://www.localendar.com/js/PublishedIncludeMini.js";

var script2 = document.createElement('script');
script2.src = "http://www.localendar.com/public/halomotaf?include=Y&style=M5";

Disclaimer; I haven't tested that yet, but it seems like it might work...

BTW, can I ask how you achieved the result of reversing the calendar automatically?
Marc Higgins
Support Associate, localendar.com
Follow us on Twitter! http://www.twitter.com/localendar_news

Help! | Cobranding | Legal | Privacy Policy | About localendar.com | Contact Us