Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help please

Status
Not open for further replies.

ameslee

Programmer
Feb 12, 2006
34
0
0
AU
i need this form to send the data entered into it to my email and the postcode has to be numeric and and data must be entered into both the postcode and the feedback fields, this is so confusing can anyone help?
<HTML>
<HEAD>
<TITLE> Integrate and Use a Scripting Language </TITLE>
<script type = "text/VBScript">
function submit3()
dim intpostcode, intfeedback
intpostcode = document.frmfeedback.txtpostcode.value
intfeedback = document.frmfeedback.txtfeedback.value
blnNumber = isNumeric(strpostcode)
if (blnNumber = false) then
window.alert("Please enter a 4 digit postcode")
end if
if (Len(document.frmfeedback.txtpostcode.value) = 0) then
'alert user
window.alert("Please enter your postcode")
'send the cursor to the fullname field
document.frmfeedback.txtpostcode.focus()
end if
'check to see if the feedback field is empty
if (Len(document.frmfeedback.txtfeedback.value) = 0) then
alert("Please enter your feedback")
document.frmfeedback.txtfeedback.focus()
end if
'if both fields are filled out, send to email
'frmfeedback.submit
end function
</script>
</HEAD>

<BODY bgcolor="#FFCC66" link="#990000" vlink="#999900" alink="#CC3300">
<h1 align="center"><font color="#996600">Integrate and Use A Scripting Language</font></h1>
<p align="center">
<td><hr>
<form method="post" name="frmfeedback" action="mailto:ames_rupa@hotmail.com" enctype="text/plain">
<h1 align="center"><font color="#996600">Feedback Form</font></h1>
<table width="33%" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="50%"><strong><font color="#996600">Surname:</font></strong></td>
<td width="50%"><input type="text" name="txtsurname" size="28"></td>
</tr>
<tr>
<td><strong><font color="#996600">Firstname:</font></strong></td>
<td><input type="text" name="txtfirstname" size="28"></td>
</tr>
<tr>
<td><p></p>
<strong><font color="#996600"> Address:</font></strong></td>
<td><input type="text" name="txtaddress" size="28"></td>
</tr>
<tr>
<td><strong><font color="#996600"> Postcode*:</font></strong></td>
<td><input type="text" name="txtpostcode" size="28"></td>
</tr>
<tr>
<td><strong><font color="#996600">Phone Number: </font></strong></td>
<td><input type="text" name="txtphoneno" size="28"></td>
</tr>
<tr>
<td><strong><font color="#996600">Email Address:</font></strong></td>
<td><input type="text" name="txtemail" size="28"></td>
</tr>
<tr>
<td><strong><font color="#996600">Feedback Information*: </font></strong></td>
<td><input type="text" name="txtfeedback" size="28"> </td>
</tr>
<tr>
<td colspan="2"><p align="right">
<input name="submit" type="button" onClick = "submit3()" value="Send Feedback">
</p>
<p><font color="#996600"><strong>Note: Fields marked with a (*) MUST be
entered!</strong></font></p></td>
</tr>
</table>

</form>
<hr>

</BODY>
</HTML>
 
If you want help with your VBScript, you should ask in the VBScript forum.

If you want to convert your VBScript to JavaScript, you need to make this clear.

Hope this helps,
Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top