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

Textbox Reprompt On Change

Started by Dulanic, 09 Apr 2014 12:18:05 PM

Previous topic - Next topic

Dulanic

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>

Dulanic

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 ()?