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)
Enable/Disable Prompts
Vanitha P
Hi ,
I'm trying to enable/disable 2 prompts ( parameter1 & parameter2) . If User select 'parameter1' means 'parameter2' have to disable and vise versa. Prompts may be any type ( check/combo/List) . But i could not find the proper solution.
Can any one help me to solve this issue?
Thanks in Advance...!!!
Find more posts tagged with
Comments
kclark
You could make a custom parameter page and place the parameters in div tags. Then hide/show the div's based on what has been checked or selected. I used checkboxes for my example.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<html>
<head>
<script type="text/javascript">
function hide() {
if(document.getElementById('mgrs').checked) {
document.getElementById('tag2').style.visibility = 'hidden';
}else {
document.getElementById('tag2').style.visibility = 'visible';
}
if(document.getElementById('emps').checked) {
document.getElementById('tag1').style.visibility = 'hidden';
}else{
document.getElementById('tag1').style.visibility = 'visible';
}
}
function generateReport() {
if(document.getElementById('mgrs').checked) {
window.location = "http://localhost:8080/birt/frameset?__report=emps.rptdesign&emp=true";
}else{
window.location = "http://localhost:8080/birt/frameset?__report=emps.rptdesign&mgrs=true";
}
}
</script>
</head>
<body>
<div id="tag1">
<input type="checkbox" id="mgrs" onchange="hide();"> Managers
</div>
<p>
<div id="tag2">
<input type="checkbox" id="emps" onchange="hide();"> Employees
</div>
<p>
<input type="submit" name="submit" value="Sumbit form" onclick="generateReport();"/>
</body>
</html>
</pre>