Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
running javascript in html report on load
deeebee
I have a fairly dynamic report which has a chart that when you click on it will switch the pie chart to display a different pie chart. This is done using javascript and generating all the pie charts when the report loads. My question is that I want to run a javascript function when the page loads but if I include window.onload it does nothing I can't even just get it to raise an alert.
Is there any way to get birt to fire a javascript function when the page initially loads?
Thanks in advance
Richard
Find more posts tagged with
Comments
averma
Hi Richard,
You can add a text report item and add your javascript to it. Here is an example:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1116-mouse-over-details-for-a-chart/
deeebee
Thanks for the reply.
I managed to get this to work by just adding an html text control at the bottom of the report which contains a single script element that calls the appropriate init() function when the page loads.