COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Ann on 08 Jul 2011 02:45:30 AM

Title: refresh the page as soon as the value inserted in search &select prompt
Post by: Ann on 08 Jul 2011 02:45:30 AM
My requirement goes like this:

I have search and select prompt. Every time the user inserts value to it, the page should refresh.

Any clue. Its urgent.Please help.
Title: Re: refresh the page as soon as the value inserted in search &select prompt
Post by: Ann on 08 Jul 2011 03:31:23 AM
<SCRIPT type="text/javascript">

      function my_onchange()

      {                 

                SetPromptControl('reprompt')

      }

    document.forms["formWarpRequest"].elements["_oLstChoicescustomerprompt"].onchange = my_onchange

</SCRIPT>


I have these codes for list box, what changes can i do on it to implement on search and select prompt?

Title: Re: refresh the page as soon as the value inserted in search &select prompt
Post by: Ann on 08 Jul 2011 03:41:28 AM
to add i use cognos 8.4
Title: Re: refresh the page as soon as the value inserted in search &select prompt
Post by: bdbits on 08 Jul 2011 10:34:23 AM
The problem is that search and select is not a single HTML object, so there is as far as I know not a simple way to modify behavior on it with Javascript. You would have to put <span> tags around it, do a getElementById() to find the span, then address the controls inside the span.

What is the functionality you are trying to achieve? Can the autosubmit property help?
Title: Re: refresh the page as soon as the value inserted in search &select prompt
Post by: Ann on 11 Jul 2011 12:17:43 AM
As far as I understand , search & select prompt does not have a auto submit property.

Okey, I can explain my requirement n little detail.
I have a drill through link in my prompt page. Once the user selects the prompt values and then hit the drill through link, then the values selected in the prompt should be passed. Since there is no page refresh happening, no values are actually assigned to the parameter and thereby no values are passed.

Did it make any sense?
Title: Re: refresh the page as soon as the value inserted in search &select prompt
Post by: Ann on 11 Jul 2011 01:00:22 AM
here is the code I used. But It does not wrk...:( Ant Idea?

<script type="text/javascript">
function my_onchange()

      {                 

                alert(1);
promptButtonFinish();

      }
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
if (fW)
{
var a= document.getElementsByTagName("'SS").onchange;
alert(a);
document.getElementsByTagName("'SS").onchange = my_onchange;
}
</SCRIPT>
"note: SS is my span ID"


There was another method which I tried.
I tried to create a drill through link and using HTML item I tried to hit the drill through report URL.
my code goes like this:


<script type="text/javascript">
<!--
function change()
{
promptButtonFinish();
window.location = "<Report Url>&p_pgtext='+ParamValue('pgtext')+''"
}
//-->
</script>

But the problem is, I am not able to pass the parameter value. in the above example the value passed is ' ParamValue('pgtext') ''

Any Idea?
I have already tried ?pgtext? and ParamDisplayValue. None worked. :(
Title: Re: refresh the page as soon as the value inserted in search &select prompt
Post by: Ann on 14 Jul 2011 12:35:26 AM
No replies yet for this Issue. :(