Below code in bold is here i got the problem please help.the problem is while i submit the form a div appear after pressing submit button that data is submitted the div is appearing perfectly fine but the problem is after i inserted this code that is bold below for the validation my data is not submitted.i known the problem but i couldn't fix it.please help me
// JavaScript Document
$(document).ready(function(){
$("#submit").click(function(){
var value = $("#heads").val();
var value2 = $("#subhead").val();
var value3 = $("#amount").val();
var value4 = $("#stud_id").val();
// alert(value3);
if(value =="")
{
$("#heads").css('border','1px solid #F00');
}
if(value2 =="")
{
$("#subhead").css('border','1px solid #F00');
}
if(value3 =="")
{
$("#amount").css('border','1px solid #F00');
}
if(value4 =="")
{
$("#stud_id").css('border','1px solid #F00');
return false;
}
[B]
//// the problem is here
if((value !="" && value2 != "")&&(value3!= "" && value4 != ""))
{
$(".msg").delay(1500).fadeOut(1500).addClass("highlight");
$(".msg").html('<b><center style="font-family: georgia; margin-top: 12px; margin-left: 10px;">Data has been enter</center></b>');
return false;
}[/B]
});
$(".Center").click(function(){
var value = $("#heads").val();
var value2 = $("#subhead").val();
var value3 = $("#amount").val();
var value4 = $("#stud_id").val();
if(value !="")
{
$("#heads").css('border','1px solid #E5E5E5');
}
if(value2 !="")
{
$("#subhead").css('border','1px solid #E5E5E5');
}
if(value3 !="")
{
$("#amount").css('border','1px solid #E5E5E5');
}
if(value4 !="")
{
$("#stud_id").css('border','1px solid #E5E5E5');
}
});
$("input[type]=text").keydown(function(event){
if(event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 37 || event.keyCode == 39)
{
}
else
if((event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105 ))
{
event.preventDefault();
}
});
});