Hi friends
There is a html file whose name is user.htm . I use it to add new user to my system it has a form that includes text and button.I control the values of the text and if there is no value at the field of the textbox, an alert appears to warn user. And after that if user enters valid values, the pogram should send form data to the related script.But it doesn’t send.If user enters valid values for the first time, there is no problem but he enters invalid values and after that he enters valid values, this problem occurs.Is there anybody to help me about this?
My code is:
[code]
<html>
<head>
</head>
<body bgcolor=”F9F9F9″>
<form action=”user.php” method=”get”>
<table>
<tr>
<td><font color=”#526569″>Kullanıcı Adı:</font></td>
<td><input type=”text” name=”k_adi” value=””></td>
</tr>
<tr>
<td><font color=”#526569″>Şifre:</font></td>
<td><input type=”password” name=”sifre” value=””></td>
</tr>
<tr>
<td><font color=”#526569″>Şifre(Yeniden):</font></td>
<td><input type=”password” name=”sifre_y” value=””></td>
</tr>
<tr>
<td><font color=”#526569″>Kullanıcı Tipi:</font></td>
<td>
<select name=”k_tip”>
<option value=”2″ selected>Seçin</option>
<option value=”1″>Admin</option>
<option value=”0″>User</option>
</select>
</td>
</tr>
<tr>
<td align=”right” colspan=”2″><input type=”button” value=”Ekle” onClick=”javascript:
if((k_adi.value!=”)&&(sifre.value!=”)&&(sifre_y.value!=”)&&(k_tip.value!=2))
{
if(sifre.value==sifre_y.value)
{
submit();
window.close();
}
else
{
window.alert(‘Girmiş olduğunuz şifreler arasında tutarsızlık var.’);
window.location.href=’user.htm’;
}
}
else
{
window.alert(‘Lütfen tüm alanları doldurunuz.’);
window.location.href=’user.htm’;
}
“></td>
</tr>
</table>
</form>
</body>
</html>