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

Disabling a Text Item in Report Author 10.1.2

Started by gosoccer, 02 Apr 2014 11:48:55 AM

Previous topic - Next topic

gosoccer

Folks,
I am trying to write the JS code to disable a text item in my report.

I'm running Cognos Report 10.1.2 and based on the user's selection on a "value prompt",
I need to disable this text item that is not part of the value prompt.  It is a TEXT ITEM called
"SELECTED" under the properties and Misc Name

Thx so much. :D

Waydin2296

Quote from: gosoccer on 02 Apr 2014 11:48:55 AM
Folks,
I am trying to write the JS code to disable a text item in my report.

I'm running Cognos Report 10.1.2 and based on the user's selection on a "value prompt",
I need to disable this text item that is not part of the value prompt.  It is a TEXT ITEM called
"SELECTED" under the properties and Misc Name
Instead of javascript, have you tried using a conditional style or a render variable to handle this

gosoccer

Waydin,

Based on an invaluable help from Nimrod, I am using get Element and other JS techniques to disable to "Value Prompt"
document.getElementById("snsPr").getElementsByTagName("select")[0];

I didn't know the rendering or conditional styling would help? Do you by any chance have an example?

Thx in advance for your time.

gosoccer

Waydinn,
Sorry for opening a previous help.
Did you ever figure out how to disable a text item. I am stuck on this too.

I tried the following but it is not doing anything at all.

Set a name to the text Field. Under properties->Miscelaneous->Name Lets say you name it "foo"

The below short JS code disables the text field.
With this you should be able to implement you own logic for disabling/enabling

<script>
fw=getFormWarpRequest();
fw._textEditBoxfoo.disabled=true;
</script>

Thank you in advance for your time.

navissar

I hardly think two threads are in order here.

MFGF

Quote from: Nimrod Avissar on 20 May 2014 07:28:29 AM
I hardly think two threads are in order here.

Agreed. Gosoccer, why did you start a separate thread when you already have one asking this same question?

I'm closing this thread and any further responses can be added to the original:

http://www.cognoise.com/index.php/topic,24868.0.html

MF.
Meep!