I've this code:
function checkdate(FormS ubmit){
alert(document. getElementById( 'Mois').value);
if(eval(documen t.getElementByI d('Mois'))>0 &&
eval(document.g etElementById(' Annee'))>0){
document.forms['FormSubmit'].getElementByID ('SELECTCONSTRU CTOR').disabled
= false; //can't reach the control here
}
else
{
document.forms['FormSubmit'].getElementByID ('SELECTCONSTRU CTOR').disabled
= true; //can't reach the control here
}
}
....
<form name="FormSubmi t" method="post" action="">
....
<select name="Mois" onChange=checkd ate(this.form); >
....
<select name="Annee" onChange=checkd ate(this.form); >
....
<select name="SELECTCON STRUCTOR" disabled>
Now, what I would like, is to enable the SELECTCONSTRUCT OR if month and year
are selected (I mean different to 0).
I can't enable or disable. In fact I can't reach the control in the
checkdate function...
How can I enable/disable SELECTCONSTRUCT OR when my 2 fields are selected ???
BoB
function checkdate(FormS ubmit){
alert(document. getElementById( 'Mois').value);
if(eval(documen t.getElementByI d('Mois'))>0 &&
eval(document.g etElementById(' Annee'))>0){
document.forms['FormSubmit'].getElementByID ('SELECTCONSTRU CTOR').disabled
= false; //can't reach the control here
}
else
{
document.forms['FormSubmit'].getElementByID ('SELECTCONSTRU CTOR').disabled
= true; //can't reach the control here
}
}
....
<form name="FormSubmi t" method="post" action="">
....
<select name="Mois" onChange=checkd ate(this.form); >
....
<select name="Annee" onChange=checkd ate(this.form); >
....
<select name="SELECTCON STRUCTOR" disabled>
Now, what I would like, is to enable the SELECTCONSTRUCT OR if month and year
are selected (I mean different to 0).
I can't enable or disable. In fact I can't reach the control in the
checkdate function...
How can I enable/disable SELECTCONSTRUCT OR when my 2 fields are selected ???
BoB
Comment