Quantcast
Channel: How to solve client side validation problem? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How to solve client side validation problem?

$
0
0

I am working on a project and need to do some client side validation.I am doing all validations by calling the onsubmit() method.

The problem that I am facing is that the validation runs just fine when I put into comments a few other statements but not otherwise.

My code:

var speak1=document.forms["form"]["speak1"].valueb = checkSpeakLanguages(speak1);if(b==false){    return false;}

which calls checkSpeakLanguage works properly.

But the following code works only when the above is put in comments:

var m= document.forms["form"]["maritalStatus"].valueb = checkMaritalStatus(m);if(b==false){    return false;}

Please help me. Please tell me why both the second part does not work when the other is present.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>