If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

External Javascript Issue

Started by andy_mason_84, 24 Sep 2015 08:34:22 AM

Previous topic - Next topic

andy_mason_84

Hi All,

I'm trying to reference an external Javascript library. In this case Google Maps but I suspect it happens with any library.

On my report page I have an HTML item with the following:

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

This works fine in a single-page report but as soon as I add a prompt page it stops working. The rest of my Javascript renders correctly but it doesn't recognise any commands in the Google Maps library, as if the above line hasn't been declared.

Anybody else had any beef with external javascript like this?

Cheers,

AM

bdbits

Well, a prompt page is rendered as a separate web page from a report and does not include anything from the report pages. So the javascript library is not included on the prompt page unless you also add the HTML item on the prompt page.

Or add the HTML item to the prompt page as a layout component reference to the HTML item on the report page, so if you make any changes it shows up in both places.

Or make a "report" of layout component objects and reference that, which is what I am trying to do recently to simplify Google maps integration for report authors here who know little or no javascript.