If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

how to attach a onclick javascript to ptomptbutton?

Started by Universe09, 01 Jul 2009 09:25:20 PM

Previous topic - Next topic

Universe09

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

Gopinath

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

Universe09

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!

GowthamSen

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!

yossiea

If you mean that you want the report to run without having to press finish, then just change the prompts to "autosubmit"