Hi I have the following code to disable my form element in the case of the top element ‘categories’ value = 0
function checkifempty(){
if (document.getElementById(‘Select4’).value==”){
document.getElementById(‘dropdown’).disabled=true
document.getElementById(‘dropdown1’).disabled=true
document.getElementById(‘length’).disabled=true
document.getElementById(‘submit’).disabled=true
}
else
{
document.getElementById(‘dropdown’).disabled=false
document.getElementById(‘dropdown1’).disabled=false
document.getElementById(‘length’).disabled=false
document.getElementById(‘submit’).disabled=false
}
}
if (document.all ||getElementById(‘dropdown’))
setInterval(“checkifempty()”,100)
it loads on <body onload checkifempty()>
an uses the top select element onchange=”checkifempty()” to call the function if category cahnges…..so it all works sort of ok…but
I would like to have the states remembered after passing the option values to a <FORM NAME=”FORM2″ action=”<? print $_PHP_SELF; ?>” method=”POST” > tag in the page which basically passes data back to a header (php) which performs some calculation (needed to be hidden – serverside).
A. how do I get around the problem of firefox not doing the enable /disable function.
B. The remebered state issue.
One thing to remember is that the top 3 selects are populated dynamically in javascript.