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";
}

};

1 comment:

Anonymous said...

Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the Computador, I hope you enjoy. The address is http://computador-brasil.blogspot.com. A hug.