+ 3
I want to enable send button on condition.
I want to enable send button when fulfil all condition. https://code.sololearn.com/W7SqVwAoxKn7/?ref=app
6 Respostas
+ 4
//You can use flags and based upon the flag set disability of your button
var length_valid = 0;
var txt_valid = 0;
if (m!=0)
{
length_valid = 0;
... //Other code
}
else
{
length_valid = 1;
.. //Other code
}
if(maxTxtVal < 0)
{
txt_valid = 0;
... //Other code
}
else
{
txt_valid = 1;
... //Other code
}
if(length_valid && txt_valid)
{
document.getElementById ("submit").disabled = false;
}
else
{
document.getElementById ("submit").disabled = true ;
}
+ 2
ok thanks
+ 2
Full code answer for you
https://code.sololearn.com/Wt82loKS8jiZ/?ref=app
+ 2
Thanks a lot.
+ 1
I used your code but another problem show in line no. 10.
+ 1
I didnt write whole code. I just showed you how can it be done