0
   

onsubmit not working

 
 
Reply Wed 20 Aug, 2014 12:06 pm
My onsubmit is not working. Code here------------

<script>
function check(){
if(document.forms["check"]["f_name"].value==NULL || document.forms["check"]["f_name"].value==""){
getElementById('showpad').innerHTML="Please enter your name";
return false;
}
else{
getElementById('showpad').innerHTML="Thank You !";
return true;
}
}
</script>

<form id="check" name="check" onsubmit="return check()" method="post">
<input name="f_name" id="f_name" type="text" />
<p id="showpad"></p>
<input type="submit" value="submit" />
</form>
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 833 • Replies: 0
No top replies

 
 

Related Topics

 
  1. Forums
  2. » onsubmit not working
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 04/16/2024 at 09:06:07