• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Cannot display GoogleMaps, Weather Widgets using AJAX rendering

Community Beginner ,
Mar 30, 2020 Mar 30, 2020

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. 

 

 

TOPICS
Advanced techniques

Views

729

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 01, 2020 Apr 01, 2020

Copy link to clipboard

Copied

Charlie ... are you OK? 🙂

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 01, 2020 Apr 01, 2020

Copy link to clipboard

Copied

LATEST

I am, thanks for asking. Hoping the same for everyone in our community and beyond, in this crazy time. 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation