Pages

Search This Blog

Friday, March 14, 2008

[Cognos] Script to hide date controls on combo selection

List = document.formWarpRequest._oLstChoicesparamShowAll;


List.options[0].selected = true;
List.onchange=function()
{

if (List.value=='N')
{
document.getElementById('dateEditBoxToDate').style.display="inline";
document.getElementById('dateEditBoxFromDate').style.display="inline";
document.getElementById('ad').style.display="inline";
document.getElementById('ad1').style.display="inline";
document.getElementById('ad2').style.display="inline";
document.getElementById('ad3').style.display="inline";
}

else
{
document.getElementById('dateEditBoxFromDate').style.display="none";
document.getElementById('dateEditBoxToDate').style.display="none";
document.getElementById('ad').style.display="none";
document.getElementById('ad1').style.display="none";
document.getElementById('ad2').style.display="none";
document.getElementById('ad3').style.display="none";
}

};

[Cognos] Script for updating caption of Finish Button

var pstr1=document.getElementsByTagName('Button');

for(var i=0;i {
if(pstr1[i]!=null && pstr1[i].name !=null)
{
if (pstr1[i].name!=null pstr1[i].name!='')
{
if(pstr1[i].name.substring(0,6)=='finish')
{
pstr1[i].innerHTML ="Run";
}


}
}
}