|
Hi
why won't this work??
<script type="text/javascript">
function displaymessage(n)
{
var test;
test = false;
switch(n)
{
case 1:
if(document.forms1.id.options[document.forms1.id.selectedIndex].value == "")
{
test = true;
}
break;
case 4:
for(i=0;i<4;i++){
if(document.forms1.elements.value =="")
{
test = true;
}
}
break;
default:
break;
}
document.form1.Submit.disabled=test;
}
</script>
|
|
|
Hi
1. Name of the form should be either "forms1" or "form1"
2. do not use names such as "Submit" and "id" for input elements.
3. use document.form1.submit =test;
instead of "document.form1.Submit.disabled=test;"
(submit is action of submitting the form)
john
http://www.programminghelp4u.com ( Assignment / Project ) Help
|
|
|
|
|
|
|
|