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

from one input field to another input field??

Started by s.aravindkumar, 31 Jul 2017 06:52:06 AM

Previous topic - Next topic

s.aravindkumar

Hi,

I created a prompt Page having a two text field and two input field and the report is working fine.

Now i got an requirement for the same report like when the end user press tab it needs to move from one input field to another input field but it should not go to the text field.

Is there anyway to do that

Thanks in Advance ,

Aravind Kumar Sekar

New_Guy

Hi,
The tab key on the keyboard will pick the next field by default and we cannot control it. The below statement from you'it needs to move from one input field to another input field but it should not go to the text field', does this mean that you have another prompt in the prompt page. Need more explanation.

Good luck
New guy

s.aravindkumar

Hi,

yes,I have two prompt.

It need to move from first date prompt to next prompt but its moving from first date prompt to "To Open Date".

New_Guy

Hi,
Cannot change the tab behaviour as it is defined in the js files in cognos server or may be there is a way to override them by using java script. The other way is to place the, To Open date prompt above the, from date prompt. And user can use tab to go to the next prompt or shift tab to go to the To Open date.
And what is the reason for not using the tab key twice.
Good luck
New guy

CognosPaul

This is one of those times where it's not worth fighting with the client.

Assuming you're on Cognos 10 the JavaScript is:
<script>
var paulScripts = {}
  , oCR = cognos.Report.getReport("THIS")
  , gateway = window['oCV'+'_THIS_'].getRV().getCV().sGateway;

// UTILITY FUNCTIONS
/*
* function Scripts.getControl
* Simply returns the prompt control.
*/
paulScripts.getControl = function(promptName)   {
    return oCR.prompt.getControlByName(promptName);
  };


document.getElementById('PRMT_TB_'+paulScripts.getControl('prompt1')._id_).tabIndex=1
document.getElementById('PRMT_TB_'+paulScripts.getControl('prompt2')._id_).tabIndex=2

</script>


replacing prompt1 and prompt2 with the names of the prompts.