Result
Новичок
<script>
function feedbackSubmit(){
var cUserMail = document.form1.email.value;
if (document.form1.fio.value=="") {
alert("Укажите имя!");
document.form1.fio.focus();
return false;
}
if ( (cUserMail.indexOf("@") == -1) || (cUserMail.indexOf(".") == -1) ) {
alert("Неправильно заполнено поле e-mail!");
document.form1.email.focus();
return false;
}
if (document.form1.messag.value=="") {
alert("Заполните поля сообщение!");
document.form1.messag.focus();
return false;
}
document.form1.submit();
}
</script>
<form action="next.php" method="POST" name="form1" onSubmit="feedbackSubmit()">
Имя<input type="text" name="fio" size="22" style='margin-left:7px; margin-right:49px; font-family:monospace;'>
E-mail<input type="text" name="email" size="22" style='margin-left:7px; font-family:monospace;'>
<table border='0' cellspacing='0' cellpadding='0' width='100%' align='center' height='160px' style='margin-top:10px;'>
<tr>
<td valign='top'>
<table border='0' cellspacing='0' cellpadding='0' width='15%' align='left' height=''>
<tr>
<td>
<span class='otstyp'>Сообщение</span>
</td>
</tr>
</table>
<textarea name="messag" rows="6" cols="49" style='font-family:monospace;'></textarea>
<table border='0' cellspacing='0' cellpadding='0' width='109px' align='right' height='' style='' class='submit'>
<tr>
<td>
<INPUT TYPE=IMAGE SRC="img/submit.jpg" name="submit" VALUE="Отправить" onClick="feedbackSubmit()">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
он почемуто все ровно вперед пропускает дальше на обработчик (
function feedbackSubmit(){
var cUserMail = document.form1.email.value;
if (document.form1.fio.value=="") {
alert("Укажите имя!");
document.form1.fio.focus();
return false;
}
if ( (cUserMail.indexOf("@") == -1) || (cUserMail.indexOf(".") == -1) ) {
alert("Неправильно заполнено поле e-mail!");
document.form1.email.focus();
return false;
}
if (document.form1.messag.value=="") {
alert("Заполните поля сообщение!");
document.form1.messag.focus();
return false;
}
document.form1.submit();
}
</script>
<form action="next.php" method="POST" name="form1" onSubmit="feedbackSubmit()">
Имя<input type="text" name="fio" size="22" style='margin-left:7px; margin-right:49px; font-family:monospace;'>
E-mail<input type="text" name="email" size="22" style='margin-left:7px; font-family:monospace;'>
<table border='0' cellspacing='0' cellpadding='0' width='100%' align='center' height='160px' style='margin-top:10px;'>
<tr>
<td valign='top'>
<table border='0' cellspacing='0' cellpadding='0' width='15%' align='left' height=''>
<tr>
<td>
<span class='otstyp'>Сообщение</span>
</td>
</tr>
</table>
<textarea name="messag" rows="6" cols="49" style='font-family:monospace;'></textarea>
<table border='0' cellspacing='0' cellpadding='0' width='109px' align='right' height='' style='' class='submit'>
<tr>
<td>
<INPUT TYPE=IMAGE SRC="img/submit.jpg" name="submit" VALUE="Отправить" onClick="feedbackSubmit()">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
он почемуто все ровно вперед пропускает дальше на обработчик (