I have a legacy BIRT (2.6.1) report that is using a text block, set to HTML, causing the report to reload every 60 seconds. I am recreating the report in BIRT 4.2.1<br />
<br />
I did some research and it appears to have been sourced from <a class='bbc_url' href='
http://www.eclipse.org/forums/index.php/mv/tree/163879/#page_top'>http://www.eclipse.org/forums/index.php/mv/tree/163879/#page_top</a> (Jason Weathersby) which is probably an updated version of <a class='bbc_url' href='
http://www.birt-exchange.org/org/devshare/designing-birt-reports/69-periodically-reload-birt-report/'>http://www.birt-exchange.org/org/devshare/designing-birt-reports/69-periodically-reload-birt-report/</a> (Virgil)<br />
<br />
The Jason?s version is obviously simpler than Virgil?s, but JSLint is less than happy with the Jason?s JavaScript<br />
<br />
I cleaned it up some, JSLint is happier, but not content; and mine remains a rework of a generations old solution.<br />
<br />
Suggestions for a fresh approach, or rework to make JSLint happy would be appreciated. <br />
<br />
<br />
<strong class='bbc'>Legacy Version</strong><br />
<em class='bbc'>With URL ending ?ReportName.rptdesign &__overwrite=true?</em><br />
<form name="input" onSubmit="return reloadPage();"><br />
<br />
<script type="text/javascript"><br />
<br />
function reloadPage() {<br />
var targetURL = new String(location.href);<br />
location.replace(targetURL);<br />
return false;<br />
}<br />
<br />
timer=setTimeout('reloadPage()', 60000);<br />
</script><br />
<br />
<br />
<br />
<strong class='bbc'>My Version</strong><br />
<em class='bbc'>Without URL Parameters</em><br />
<form name="input" onSubmit="return reloadPage();"><br />
<br />
<script type="text/javascript"><br />
<br />
<br />
function reloadPage() {<br />
'use strict';<br />
location.reload(true);<br />
}<br />
<br />
timer = setTimeout(reloadPage, 60000);<br />
</script>