Hi,
Can anyone please help me how to attach a onlick function to a promptbutton finish? because I want to reset all the listbox to its default selection once the finish promptbutton was click.
your replies will be much appreciated!
Thanks!
Reggie
You can't do this with Cognos Finish Button. Instead create a custom Finish button using HTML. Delete the default Finish button and place a HTML item and copy/paste the following code into it.
//HTML code for Finish button
<input type="BUTTON" class="clsPromptButton" onClick="resetvalue()" value="Finish"/>
Place another HTML item and copy/paste the following code.
<script>
function resetvalue()
{
if (canSubmitPrompt())
promptButtonFinish();
code to reset all the listbox to its default selection
}
</script>
hope this helps
Hi,
I have tried the code and it works, but I have another related question to ask. is it possible that I add a function on the onlick event where after it refresh the page another table will show in the report.?
is there a possible javascript to handle this problem?
again your replies is much appreciated!
Thanks!
Hi,
I am looking for some thing like this.
I have a button. But I dont want users to "click" on the button. As and when the last prompt is filled, it should automatically click on button using java script.
Please help.
Thanks!
If you mean that you want the report to run without having to press finish, then just change the prompts to "autosubmit"