COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Dulanic on 09 Apr 2014 12:18:05 PM

Title: Textbox Reprompt On Change
Post by: Dulanic on 09 Apr 2014 12:18:05 PM
I have been searching online like crazy and I can't find this and I also searched this forum, but I'm sure it has been discussed before? Anyways, I am trying to see if anyone can help quick!

I am trying to reprompt onblur and onchange and neither seemed to help? I set the textbox at the top of the report page (hope that;s OK)..

<script>
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() :
document.forms["formWarpRequest"]);   
var fWText1 = fW._textEditBoxText1;
</script>


Then next to the textbox named Text1 and I put this to the left of the box and it's not reprompting :(
Tried both of these:

<script>
     fWText1.onchange='Reprompt()" ;   
</script>


<script>
     fWText1.onblur='Reprompt()" ;   
</script>


This is my reprompt function which deffinately works as I call it elsewhere.

<script>
function Reprompt()
{
var oCR = cognos.Report.getReport("_THIS_");
oCR.sendRequest(cognos.Report.Action.REPROMPT);
SetRepromptParm();
}

</script>
Title: Re: Textbox Reprompt On Change
Post by: Dulanic on 10 Apr 2014 09:26:57 AM
Figured it out after hours of painstaking pull my hair out fun. Obviously I needed to put the HTML to the right since it needs to render after the textbox.

But the main piece...Reprompt() needed to be Reprompt. Which is odd to me since other areas needed to call it /w the ()? Oh well, javascript newbie here anyways so I'll eventually figure out why some functions are called /w the full name and some /w ()?