Community
Participate
Working Groups
Build Identifier: 2.6.1 I have created a simple report with one text box containing some javascript as below: <script type="text/javascript">alert("Hello");</script> If I run the report in Firefox version 5, using the BIRT Viewer (on tomcat), the script tags are not recognised. Note: This bug is firefox 5 specific. The report runs on all other browsers including Firefox 4, IE, Chrome etc. It also runs fine using the Eclipse BIRT Web Viewer I have attached the sample report. I am using Birt version 2.6.1 The above was working in FireFox 4, so something has changed in FireFox 5. If I use the same code in a simple HTML page (not in BIRT), it works fine in FireFox 5: <HTML> <HEAD> <script type="text/javascript">alert("Hello");</script> </HEAD> <BODY/> </HTML> So the issue is BIRT-related when using FireFox 5. We are using javascript in text boxes to create dynamic reports, so this functionality is of high importance. Reproducible: Always Steps to Reproduce: 1. Create a text box and add the code: <script type="text/javascript">alert("Hello");</script> 2. Run the report via the BIRT Viewer on tomcat using Firefox 5 browser
Created attachment 199139 [details] Test Report
I am having the same problem. Does anyone know if there is a fix yet for this?
Same problem occurs with Firefox 6.0 beta
We also have a major loss of functionality when using Firefox 5 due to this issue. Our reports are using dynamic javascript sliders inside text boxes to update report information and the sliders are no longer working. Manoshan
Same problem occurs with Google Chrome 13 (stable), 14 (beta) and 15 (dev)
This may be related: http://www.birt-exchange.org/org/forum/index.php/topic/23155-firefox-56-issue-with-report-viewer/
May be I've found the problem. Birt viewer executes all javascript embedded with this code: // Internet Explorer has a funky execScript method that makes this easy if ( window.execScript ) window.execScript( scripts[i].innerHTML ); this don't work anymore in FF and Chrome. Changing this to // Internet Explorer has a funky execScript method that makes this easy if ( window.execScript ){ window.execScript( scripts[i].innerHTML ); }else { with (window) { window.eval(scripts[i].innerHTML); } } works (http://isolasoftware.it/2011/09/14/birtjavascript/) Do you think that this is a good solution?
Giulio, Thanks for the finding. Here's a patch against 2.6.x and 3.7.x releases and the modified version of AbstractReportComponent.js. Please use it to replace the one under the folder "birt\webcontent\birt\ajax\ui\report" for now.
Created attachment 203375 [details] AbstractReportComponent.js patch
Created attachment 203376 [details] AbstractReportComponent.js modified
Just a note, the bug is also on 2.5.2
This is also reported in BIRT 3.7.1 and is an administration nuisance to have to use the patched js file.
Is there a way to get this to bubble up since a solution was proposed?
The patch was included in 3.7.2. I'm closing this to avoid confusion.
Thanks for the update!