Function to disable items
432801Sep 28 2006 — edited Oct 20 2006Hi everybody,
My function disFormItems :
<script language="JavaScript1.1" type="text/javascript">
function disFormItems(item1){
if(document.getElementById(item1).value != "")
{
disItem = document.getElementById(item1);
disItem.style.background = '#C0C0C0';
disItem.disabled = true;
}
}
</script>
I call it on my p32_id_feuillet element
OnClick="disFormItems('P32_ID_FEUILLET');" It works.
But I want to launch this function when I open the page
Second, I want my element to be bold, when I add disItem.style.font = ‘bold’ but my element don’t stay to a disabled state.
Thanks. Bye.