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

Deselect all and apply button should disabled

Started by srinu_anu2007, 19 Jun 2014 06:19:54 AM

Previous topic - Next topic

srinu_anu2007

Hi Experts,

I have account lines value prompt(check boxgroup) and Multi Select(YES) and i have given some default selection which is, whatever
you select in report it should display the same in my output

Let's say example:

?Param_Account_LineS? is having the values a,b,c,d,e and defualt values is MUN of a and MUN of b etc....

and when you select a,b,c and my output would be a,b,c only and my requirement is when u click deselect all and my apply button should be disabled.

Can anyone help me how to achieve this?

MDXpressor

Is the required property of the prompt object set to 'yes'?  If the prompt is required, then the apply button (which I'm assuming is a reprompt button) will automatically be greyed out.
No, a proof is a proof. What kind of a proof? It's a proof. A proof is a proof, and when you have a good proof, it's because it's proven.

-Jean Chretien

srinu_anu2007

the required prompt set to Yes. but here iam using the jS for apply button. Please help me how to disable apply button when i deselect all.

here is js for apply button: <div pt="btn" class="clsPromptComponent">
     <button style="background: #646464; font-weight: bold;" onclick="javascript:mainPageReloading(); javascript:fnSubmitCommentaryForm();javascript:fnSubmitForm()" onmouseout="" onmouseover="" class="ubspb" id="CustomSubmit2" name="CustomSubmit2" type="button">
             <span class="textItem" tabindex="0">Apply</span>
     </button>
</div>

<script type="text/javascript" language="javascript">
   
     if (typeof oCVRS != 'undefined') {

   var promptButtonCustomSubmit2 = new CPromptButton (document.getElementById("CustomSubmit2"), PROMPTBUTTON_NEXT, true, "RS");
   oCVRS.pageNavigationObserverArray =  oCVRS.pageNavigationObserverArray.concat("promptButtonCustomSubmit2");
   oCVRS.notify();

     } else if    (typeof oCV_NS_ != 'undefined') {

           var promptButtonCustomSubmit2 = new CPromptButton (document.getElementById("CustomSubmit2"), PROMPTBUTTON_NEXT, true, "_NS_");   
   oCV_NS_.pageNavigationObserverArray = oCV_NS_.pageNavigationObserverArray.concat("promptButtonCustomSubmit2");
   oCV_NS_.notify();
    }
</script>

I want to resovle this issue using the javascript. Please help me can any one?

I am writing my prompts on report page.

Thanks,

srinu_anu2007


srinu_anu2007

Hi Nimrod

Can you help me? iam not good as in javascript

if anyone having any ideas please post the same
Thanks,

MDXpressor

Sorry Srinu,
I wish I could help.  However my skills in .js are weak at best.  Have you tried looking at CognosPaul's site, or the IronSide site?  CognosPaul (also a member on Cognoise) has extensive experience embedding .js into Cognos.

Good luck.
MDXpressor
No, a proof is a proof. What kind of a proof? It's a proof. A proof is a proof, and when you have a good proof, it's because it's proven.

-Jean Chretien

navissar

#6
Right.
It is not my habit to give specific scripted answers unless I think that others, now or in the future (Hello future people! Please tell me you have hovercrafts there!), might benefit from the same code. The reason is, if someone needs something quite specific that isn't likely to be of use to anyone else, that means i'm basically putting in work (I test case any solution I publish here) for just one person/company; this conflicts with the fact companies usually pay for my work, so I try to avoid this. To me, this is the difference between giving back to the community and doing work for free. One may disagree with me, but that's the way i see things.

This case seems an awful lot like something of that sort, but I'm not entirely sure it is without merit. In other words, the code snippet you attached seems to be ill-written and messy, and your submit button does three different things for which you did not supply the code. Writing a solution over this might be what you're after, but it's messy, a lot of work and won't server anyone else. If you tell us what is the functionality required from your submit button, and it's something other people can use as well, I'll try to work out a way to do it that's not as patchy. So, let me ask you this: I don't want to know what your scripts are doing. Rather, I want to understand why you are using a custom button - What does your button do that a normal submit button doesn't? Maybe there's a better way to take care of it all together.

srinu_anu2007

Hi Nimrod,
Thanks for prompt response.

We have commentary section with in my report page along with 10 prompts(all defaluts/selceted) and we use custom submit button to submit the selected values to the commentary section whihc is purely java code using custom submit button so we are unable to submit the commentary section using the normal prompt button.

Thanks,

navissar

As I suspected, this is very very specific. Hard to imagine anyone else ever being in this scenario. Sorry, I won't be able to dive into your specific needs and provide a solution.

MFGF

Hi,

You wrote:
Quote from: srinu_anu2007 on 23 Jun 2014 01:18:16 AM
the required prompt set to Yes. but here iam using the jS for apply button. Please help me how to disable apply button when i deselect all.

here is js for apply button: <div pt="btn" class="clsPromptComponent">
     <button style="background: #646464; font-weight: bold;" onclick="javascript:mainPageReloading(); javascript:fnSubmitCommentaryForm();javascript:fnSubmitForm()" onmouseout="" onmouseover="" class="ubspb" id="CustomSubmit2" name="CustomSubmit2" type="button">
             <span class="textItem" tabindex="0">Apply</span>
     </button>
</div>

<script type="text/javascript" language="javascript">
   
     if (typeof oCVRS != 'undefined') {

   var promptButtonCustomSubmit2 = new CPromptButton (document.getElementById("CustomSubmit2"), PROMPTBUTTON_NEXT, true, "RS");
   oCVRS.pageNavigationObserverArray =  oCVRS.pageNavigationObserverArray.concat("promptButtonCustomSubmit2");
   oCVRS.notify();

     } else if    (typeof oCV_NS_ != 'undefined') {

           var promptButtonCustomSubmit2 = new CPromptButton (document.getElementById("CustomSubmit2"), PROMPTBUTTON_NEXT, true, "_NS_");   
   oCV_NS_.pageNavigationObserverArray = oCV_NS_.pageNavigationObserverArray.concat("promptButtonCustomSubmit2");
   oCV_NS_.notify();
    }
</script>

I want to resovle this issue using the javascript. Please help me can any one?

I am writing my prompts on report page.

Thanks,

You didn't get an answer for 24 hours, then you posted:

Quote from: srinu_anu2007 on 24 Jun 2014 02:00:33 AM
Hi MDXpressor,

Can you help me?

Then only three hours later you followed this with:

Quote from: srinu_anu2007 on 24 Jun 2014 05:54:25 AM
Hi Nimrod

Can you help me? iam not good as in javascript

if anyone having any ideas please post the same
Thanks,

I completely understand that you are keen to get answers, but you really mustn't be pushy with other forum members in this way. Appealing to individuals like this in an attempt to force them into answering is not polite. This isn't the first time you have behaved in this way, either. I really don't like having to write these kinds of messages when forum members step out of line, but I like seeing other forum members abused and taken for granted even less. Pleas stop this behaviour Srinu. This is the final time I will ask.

MF.
Meep!

srinu_anu2007

Hi MF,

You completely misunderstand me.

What my intesion, forum people can able to understand what ever i have posted/written the code and am not asking anyone Forcibly to get answers for my question. I asked MDXpressor because if he didn't look into the issue might be i will get someone(nimrod)anyone else help on the same issue. I will never cross the Forum Etiquette.

Thanks,



MFGF

Quote from: srinu_anu2007 on 26 Jun 2014 04:32:35 AM
Hi MF,

You completely misunderstand me.

What my intesion, forum people can able to understand what ever i have posted/written the code and am not asking anyone Forcibly to get answers for my question. I asked MDXpressor because if he didn't look into the issue might be i will get someone(nimrod)anyone else help on the same issue. I will never cross the Forum Etiquette.

Thanks,

It's really good that you want to make sure other members understand your issues - posting more details is a great way to do this. Appealing to forum members by name, asking "can you help me?" Is not, though. It puts that member in an awkward position, feeling they should respond because they have been asked specifically. This moves beyond the realm of acceptability on a forum such as this one, where members post answers of their own free will if they feel they have anything valuable to contribute. MDXpressor and Nimrod both have their own full-time careers and all of the associated deadlines and stresses these carry. It is impolite and unfair of anyone to put them in a position where they feel obliged to spend time replying to a post on Cognoise. If they do so of their own free will, that's their choice, but they should not be put in a situation where they feel compelled to. Posting to a forum member by name, saying "can you help me?" puts them in that situation.

I hope this clarifies the situation for you. You post appears to imply you didn't see a problem with what you did. Hopefully now you understand why I asked you to stop.

MF.
Meep!

srinu_anu2007

I understand thanks for your suggestion and i will keep in mind(do not write names and seeking help from any one of forum members) for my next post.

Thanks,