Click to See Complete Forum and Search --> : HTML Forms (Text + Attachment)


susha
03-19-2003, 07:18 AM
Hi,

I want to make an HTML form that will send by E-mail Text data as well as an attached file.

The following code doesn't work properly:

***********************************
<html>
<head>
<script>
function redirect() {
setTimeout("window.location='http://www.yahoo.com'",500);
}
</script>
</head>
<body>
<form action="MAILTO:anyone@anywhere.com?subject=Attachment Test" method="post" ENCTYPE="multipart/form-data" onSubmit="redirect()">
<h3>This form sends an e-mail to an E-mail address specified.</h3>
Name:<br>
<input type="text" name="name" value="yourname" size="20">
<br>
Mail:<br>
<input type="text" name="mail" value="yourmail" size="20">
<br>
Comment:<br>
<input type="text" name="comment" value="yourcomment" size="40">
<br><br>
Attach File:
<br><br>
<INPUT TYPE="file" NAME="attachedfile" MAXLENGTH=50 ALLOW="text/*" >
<br><br>
<input type="submit" value="Send">
<input type="reset" value="Reset">
</form>
</body>
</html>
*****************************

Please, could you help?

Regards,
Susha John.

susha
03-20-2003, 10:44 PM
Hi Dave,

Thanks a lot for your reply. I'll try the code.

Have a nice time!

Susha John