B
ben
Hi,
I made a form for sending mails to me. But before the mail is sent, the name
must be filled, and as long it's not done, the same message must appear. I
tried with different way (submit inputbox, button inputbox, action in
jscript, action in the form definition line ...)
See the code:
<script language=javascript>
function stp()
{
if (document.getElementById("in1").value.length == 0)
{
alert("you forgot your name");
}
}
</script>
<FORM id=f1 action="http://myprovider/cgi-bin/FormMail.pl" METHOD="POST">
input type=hidden name="env_report" value="REMOTE_ADDR,HTTP_USER_AGENT">
input type=hidden name="recipient" value="(e-mail address removed)">
Put your name: <input id=in1 type="text" size="40" name="na">
input type="submit" name="knp" value="send" onclick="stp()">
</form>
I made a form for sending mails to me. But before the mail is sent, the name
must be filled, and as long it's not done, the same message must appear. I
tried with different way (submit inputbox, button inputbox, action in
jscript, action in the form definition line ...)
See the code:
<script language=javascript>
function stp()
{
if (document.getElementById("in1").value.length == 0)
{
alert("you forgot your name");
}
}
</script>
<FORM id=f1 action="http://myprovider/cgi-bin/FormMail.pl" METHOD="POST">
input type=hidden name="env_report" value="REMOTE_ADDR,HTTP_USER_AGENT">
input type=hidden name="recipient" value="(e-mail address removed)">
Put your name: <input id=in1 type="text" size="40" name="na">
input type="submit" name="knp" value="send" onclick="stp()">
</form>