Home
Analytics
An interactive chart disappears when a text element having Javascript function to change font color
preethilk
Hi,<br />
<br />
An interactive chart disappears when a text element having Javascript function to change font color is added.<br />
<br />
I used the existing Client Side Event variables BIRT example.<br />
Made some changes, like, added report parameter, used Invoke Script to add some additional functions and used windows open to work as a hyperlink.<br />
<br />
Everything worked fine till I added a text box with a javascript color() function to change a text font color.<br />
Now with this new elementaddition , my Report only displays the text with the font color changed.<br />
The text appears in the Top-Leftmost of the Report page.<br />
<br />
<br />
I guess, I would have made some minor mistake, which swallows rest of the report elements.<br />
<br />
Also, tested by adding a Label element. <br />
Even the label failed to get its place in the report output.<br />
<br />
<br />
<strong class='bbc'>And this is the script for the text element,</strong><br />
<br />
<script type="text/javascript"><br />
<br />
var str = "Hello world!";<br />
document.write(str.fontcolor("green"));<br />
<br />
</script>
Find more posts tagged with
Comments
mwilliams
Can you recreate the issue with a report I can run and attach it in here so I can run it and see it? Thanks!
preethilk
Hi William, Thanks for the response.
Have attached the sample report.
The interactive Report, if you remove the text element is expected to open the web pages with the following input param values,
* Give input parameter as 2010/08/03 and select the "Chris Kwai" Bar, to get the web page
* Give input parameter as 2010/04/21 and select the "Ice Bella" Bar, to get the web page
However, if the text box with the script for setting the color of the text present, the Report displays only the Text with the change in font color. The other elements of the report are not displayed.
Thanks,
Preethi
preethilk
preethilk
Also, could you please tell me the right approach to set the font color?
Thanks,
Preethi
preethilk
I guess there should be a way to select the text element by Id and then set its font color..., or any other possible approaches...?