Hi! I have a form that a user fills out to send an email message. It requests the usual stuff: Sender's Name, Sender's Email address, Recipient Name, Recipient Email address, message. After they hit SUBMIT, the action displays what they've entered after doing some error checking to make sure all required fields are entered. Most of the time, it works fine. The client has reported and shown me screen shots of what happens sometimes. The script reports the Sender's Name is missing as an error. BUT IT'S THERE! Does anyone have any ideas of what could be wrong. Here are some code snippets:
The action is here:
Thanks!
Code:
<form action="admin/sendDistribution2_test.asp" ENCTYPE="multipart/form-data" method="post">
<tr>
<td class="fontbold" align="left">[COLOR=#ff0000]Sender's Name:[/color]</td>
</tr>
<tr>
<td class="font1">
<input class="font1" type="text" name="txtName" size="50">
</td>
</tr>
<tr>
<td class="fontbold" align="left">Sender's Email:</td>
</tr>
<tr>
<td class="font1">
<input class="font1" type="text" name="txtEmail" size="50">
</td>
</tr>
<tr>
<td class="font1"> </td>
</tr>
<tr>
<td class="fontbold" align="left">Message Subject:</td>
</tr>
<tr>
<td class="font1">
<input class="font1" type="text" name="txtSubject" size="70">
</td>
</tr>
<tr>
<td class="fontbold" align="left">Message:</td>
</tr>
<tr>
<td class="font1">
<textarea name="txtAreaMessage" class="font1" cols="85" rows="15"></textarea>
</td>
</tr>
<tr>
<td class="font1"> </td>
</tr>
<tr>
<td class="fontbold" align="left">Attachments:</td>
</tr>
<tr>
<td class="font1">
<input class="font1" type="file" name="file1" size="70"><br>
<input class="font1" type="file" name="file2" size="70"><br>
<input class="font1" type="file" name="file3" size="70">
</td>
</tr>
etc.
The action is here:
Code:
[COLOR=#ff0000]strName = Trim(objUpload.Form("txtName"))[/color]
strEmail = Trim(objUpload.Form("txtEmail"))
strSubject = Trim(objUpload.Form("txtSubject"))
strMessage = Trim(objUpload.Form("txtAreaMessage"))
'FLAG CHECKING IF REQUIRED FIELD ARE FILLED
blnContinue = true
strErrorMessage = ""
'CHECK FOR REQUIRED FIELDS
if (strName = "") then
strErrorMessage = strErrorMessage & "<li>Sender's Name"
blnContinue = false
end if
if (strEmail = "") then
strErrorMessage = strErrorMessage & "<li>Sender's Email Address"
blnContinue = false
end if
if (strSubject = "") then
strErrorMessage = strErrorMessage & "<li>Message Subject"
blnContinue = false
end if
if (strMessage = "") then
strErrorMessage = strErrorMessage & "<li>Message"
blnContinue = false
end if
'CHECKS REQUIRED FIELDS
if not(blnContinue) then
%>
<span class="warning">
The following criteria must be entered.
</span>
<span class="font1">
<ul>
<%=strErrorMessage%>
</ul>
Please push the back button on your browser and try again.
</font>
Thanks!