Question

I'm using cognos report studio and I came to an error on my prompt page. I got my coding to work right(I tested it on a blank page), but I noticed theres a yellow explanation point on the bottom left, which doesn't allow me to continue what I'm trying to do.enter image description here

Here is a screenshot:

The error seems to be coming from my html tag in the prompt page.

Here is my coding:

<script type="text/javascript"> 
var theSpan = document.getElementById("FiscalYear"); 
var theSelect = theSpan.getElementsByTagName("select"); 
theSelect[0].options[2].selected=true; //This will make default value in prompt to be the first item after line, change the value '2' for other item 
theSelect[0].options[0].text = 'Fiscal Year'; 
listBoxBusinessDate.checkData(); 

</script>

My error should be coming from there, I just can't figure out why. Any ideas on what it could be? Thanks.

Was it helpful?

Solution

This is a JavaScript error. The variable you are trying to use "listBoxBusinessDate" is null / undefined, so when you try to call a method on it (.checkData()), you get this error.

Where is this variable defined (its not in the snippet you provided, but could be defined earlier in the file)...?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top