Copy link to clipboard
Copied
Ok, building a web site that, once loaded, does not select objects based on URL, instead we have one huge <div id=""></div>
When button is clicked, javascript function loads an AJAX function and sends it an "object ID".
<cfsavecontent>constructs all the data.
Returns it to the Javascript and we then object_detail.innerHTML=xxx and put it to the screen.
Then perform a JQuery slideDown ...
ALL WORKS WELL.
Until we want to Google Maps.
Or a new widget we want(ed) to add; a weather widget to provide us with the weather in that object.
I also created on a simple .cfm splash page and put the same script into that.
Works perfectly.
Script looks like:
<a class="weatherwidget-io" href="https://forecast7.com/en/48d862d35/paris/" data-label_1="PARIS" data-label_2="WEATHER" data-theme="original" >PARIS WEATHER</a>
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src='https://weatherwidget.io/js/widget.min.js';fjs.parentNode.insertBefore(js,fjs);}}(document,'script',...');
</script>
On the real screen all I get is the LINK PARIS WEATHER.
Weatherwidget then told me their product would not support over 30 "locations".
So I went to darksky.net at their suggestion ... same problem.
Is there a work around for either Googlemaps or these widgets when using AJAX to render screens in the background? I was told Javascript needs to be present ... but it is cause we're using it all the time.
For now it's a theory based question ... if code is needed, happy to upload stuff to really make it look like a hornets nest.
Copy link to clipboard
Copied
Charlie ... are you OK? 🙂
Copy link to clipboard
Copied
I am, thanks for asking. Hoping the same for everyone in our community and beyond, in this crazy time.