COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: techieaman on 25 Nov 2009 10:41:17 PM

Title: javascript to enable-disable two date range prompts in cognos 8.3
Post by: techieaman on 25 Nov 2009 10:41:17 PM
Hi All,

Does anybody have some javascript to do an enable/disable of 2 date range prompts? I need it urgently for a report.

and if possible, anyone can share the javascript function/property list in report studio that would be great.

thanks for your help

warm regards,

aman
Title: Re: javascript to enable-disable two date range prompts in cognos 8.3
Post by: techieaman on 26 Nov 2009 09:29:21 PM
Hi,

Can anyone help me with this javascript? I need to identify the date prompt and then disable the other date range on selection?
Facing problem with identification of the date prompt, the right function is needed.

Thanks

aman
--------------------------------------------------------------------
<script>
/*var form1=getFormWarpRequest();*/
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
var aa11=form1.txtDatedate11;
var aa12=form1.txtDatedate12;
var bb21=form1.txtDatedate21;
var bb22=form1.txtDatedate22;


if (fW.aa11.selectDate == true || fW.aa12.selectDate== true)
{
fW.bb21.disable=true;
fW.bb22.disable=true;
}
else if (fW.bb21.selectDate == true || fW.bb22.selectDate == true)
{
fW.aa11.disable=true;
fW.aa12.disable=true;
}

</script>
-----------------------------------------------------------------------