Hi All,
the following code is clearing my form before it submits not after how do i fix this ?
any ideas would be great thanks.
the following code is clearing my form before it submits not after how do i fix this ?
Code:
<iframe src="messages.asp" height="75%" width="100%" frameborder="0" name="view"></iframe>
<br>
<div align="left">
<FORM name="fsend" METHOD="Post" ACTION="messages.asp" target="view">
<b>
Name: <INPUT TYPE="Text" NAME="handle" value="" maxlength="10" size="10">
Message: <INPUT TYPE="Text" NAME="msg" value="" maxlength="600" size="45">
<INPUT TYPE="Submit" VALUE="Send" style='background:green;color:white;font:bold' onclick='checkit();'>
</b>
</div>
</form>
<script>
function checkit(){
if (document.fsend.msg.value=="" || document.fsend.handle.value=="")
alert("Enter Value");
clear();
}
function clear(){
//document.fsend.reset();
document.fsend.submit();
document.fsend.msg.value="";
}
</script>
any ideas would be great thanks.