- This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
Viewing 9 posts - 1 through 9 (of 9 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › how can i remove the bugs here [in disabling buttons]
for some reasons it did not run on codepen so created a [fiddle](http://jsfiddle.net/u3RZV/ “fiddle here”)
their are many bugs here
and i believe it is a wrong way to do it
so please help me out
Yeah..I’m not sure what it is you are trying to achieve.
Some sort of proper validation would make more sense than the confusing stuff I can see here.
well there is validation that is working but with one problem
i.e. it is either displaying wrong pass error or it is confirming the sign in but not displaying empty field error
if u can help me out in that would be nice
https://www.dropbox.com/sh/otgy1pypltgzpsq/vYRuH2Nge3?v=0mcn
there is an error here.
$(“.submit-name”).removeAttr(“disabled”);
should be
$(“.submit-name”).attr(“disabled”);
@unasAquila well the problem prevails still (the problem is when user fills the data and then deletes it)
>the problem is when user fills the data and then deletes it
Why is this a problem?
i wanted that if the field(s) are empty then button is disabled if both are filled button is enabled
but if user fills in the fields [button enabled] and then deletes the data in it then [**button is not disabled**] that is the problem!!!
Seems like an odd form of validation.
Wouldn’t it make more sense to always have the button enabled but not **submit** the data if the minimum criteria isn’t met?
Isn’t that the normal way.
well actually i was using it as a bypass for my errors in login.php which are now solved (thanks to @unasAquila)
so this question now remains for educational purposes only
if there is a way then post it else i am marking it as solved.