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

at start will it be possible to place the cursor in text prompt

Started by cognoshelp@ymail.com, 29 Sep 2008 08:41:50 AM

Previous topic - Next topic

cognoshelp@ymail.com

My question here is

when user runs the report, I have a prompt page with couple of prompts what I need here is by default I need the cursor in one of the prompt (I have text prompt) so that user dont needs to place the cursor in the text prompt.

In my case user dont have any mouse to move the cursor so he needs to use the tab key which I dont want.

so will it be possible to put the cursor in prompt so that user can directly type in there.


Sunchaser

Hi,

I don't know if you are working  on C8.2 or C8.3.
In case of you are using 8.2, try adding a HTML Item put after the TextBox, with a script like:

<script text=javascript>
var obj = document.forms["formWarpRequest"].elements["_textEditBoxtxtTB"];
if (obj != null)
{
obj.focus();
}
</script>
In this example, the property "Name" of the TextBox is: "txtTB".

Hope it'll heklp you


harish.malik

Thks Sunchaser..

the script seems to help me in one of my problems.

Regards,
~Harish

Cognosian

Quote from: Sunchaser on 29 Sep 2008 11:50:41 AM
Hi,

In case of you are using 8.2, try adding a HTML Item put after the TextBox, with a script like:

<script text=javascript>
var obj = document.forms["formWarpRequest"].elements["_textEditBoxtxtTB"];
if (obj != null)
{
obj.focus();
}
</script>



Hi Sunchaser,

How can I do the above in 8.3? I've tried the following, but it gives me an error.

<script text=javascript>

var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
fW._textEditBoxInputBox.focus();

</script>


Error I receive is: "Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus."

The thing is the edit box is not invisible or disabled...so please help if you can.

Another small question I have is, is there a way to reprompt when user hits the 'Enter' key instead of the reprompt button on a Prompt page??

Thanks.

Sunchaser

Hi Cognosian,

I knew that, I tried many things to make it work on 8.3 but I must admit that the new "system" from Cognos is so locked that I didn't find the solution.
So, it's sunday in france here, I'm not supposed to work on my "classical" problems, so I'm going to try again to the find the clue, just for "fun"... But I fear that I won't be able to.

For the last question, the first thing I would try is to do is to do a "attachEvent" on the editBox, in order to catch the 'Enter' key pressed event and then call the original Reprompt() action from Cognos (if I remember correctly, it is possible to find it and call it in 8.3 too).

I'll be back to you later to tell If I have a solution or not.

Sunchaser

Hi,

It's a really strange problem, and I still can't find any solution with 8.3; I'm not "qualified" enough in js I think, and hope someone could came and show me.

I've tried to scan and modify the "hierarchy" of objects around the textbox (parentNodes, etc ...) but I didn't find where/what was blocking.