I have a form that users put in text, drop down menus, and a file to upload(if they want) the process works fine if the user inputs a file and submits the form, it then updates a database and send the mail with attachment. but when the user doesnt want to upload a file it gets hung up and says "The remote procedure call failed and did not execute" ive tried different if statements and stuff but cant figure out a way for this to work if user doesnt want to upload. here is the for and the peice of code on the other page where it gets hung up at
<table class="logonform">
<tr>
<td align = center><p class="tellenheader">Submit a Help Desk Ticket</p></td>
</tr>
<tr>
<td><hr /></td>
</tr>
<tr><td>
<%
'If the submitter is not yet in the submitter table pass ID=none in the query string.
If index1 > 0 Then
Response.Write "<form enctype='multipart/form-data' method='post' action='problem_tickets_receipt.asp?ID=Exists' id=form1 name=form1>"
Else
Response.Write "<form enctype='multipart/form-data' method='post' action='problem_tickets_receipt.asp?ID=none' id=form1 name=form1>"
End If
%>
<table>
<tr>
<td>Submitter Name</td>
<td width = 20> </td>
<td>Submitter Email</td>
<td width = 20> </td>
<td><tr>
<center><input type="file" name="f1"></center><br>
</td><input type="button" value="Update info" id="whatever" onclick="window.location.href=('helpdesk_info_update.asp'); ">
</tr>
<tr>
<%
'if submitter exists in database display thier info
If index1 > 0 Then
objRS_UserExists.MoveFirst
Response.Write "<td class='helpdeskdata'>" & objRS_UserExists("submitter_name") & "</td>"
Response.Write "<td> </td>"
Response.Write "<td class='helpdeskdata'>" & objRS_UserExists("submitter_email") & "</td>"
'else display entry form fields
Else
Response.Write "<td><input type=text name=sub_name></td>"
Response.Write "<td> </td>"
Response.Write "<td><input type=text name=sub_email></td>"
End If
objRS_UserExists.Close
Set objRS_UserExists = Nothing
%>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>User First Name</td>
<td> </td>
<td>User Last Name</td>
<td> </td>
<td>User Reference Number</td>
</tr>
<tr>
<td><input type=text name=fname></td>
<td> </td>
<td><input type=text name=lname></td>
<td> </td>
<td><input type=text name=wireless_num></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>Urgency</td>
<td> </td>
<td>Case Type</td>
</tr>
<tr>
<td><select name=urgency>
<option value="Low">Low
<option value="Medium">Medium
<option value="High">High
</select>
</td>
<td> </td>
<td><select name=case_type>
<option value="Request">Request
<option value="Problem">Problem
</select>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td colspan = 5>Problem Subject(50 characters max)</td>
</tr>
<tr>
<td colspan = 5><input type=text name=problem_desc size = 50></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td colspan = 5>Detailed Description</td>
</tr>
<tr>
<td colspan = 5><textarea rows="6" name="detailed_desc" cols="75"></textarea></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><input type=submit value="Submit Ticket"></td>
</tr>
</form>
here is other page where it gets hung up
<% Dim upl %>
<% Set upl = Server.CreateObject("SoftArtisans.FileUp") %>
---------tried to insert something like if upl.form("f1") <> "" then ------- but it wont work. it then just works the opposite way
<% upl.Path = "C:\WUtemp" %>
<% upl.Save %><BR>
<br><br>
<%
Dim Fileup
Fileup = upl.Form("f1").ServerName
%>
<table class="logonform">
<tr>
<td align = center><p class="tellenheader">Submit a Help Desk Ticket</p></td>
</tr>
<tr>
<td><hr /></td>
</tr>
<tr><td>
<%
'If the submitter is not yet in the submitter table pass ID=none in the query string.
If index1 > 0 Then
Response.Write "<form enctype='multipart/form-data' method='post' action='problem_tickets_receipt.asp?ID=Exists' id=form1 name=form1>"
Else
Response.Write "<form enctype='multipart/form-data' method='post' action='problem_tickets_receipt.asp?ID=none' id=form1 name=form1>"
End If
%>
<table>
<tr>
<td>Submitter Name</td>
<td width = 20> </td>
<td>Submitter Email</td>
<td width = 20> </td>
<td><tr>
<center><input type="file" name="f1"></center><br>
</td><input type="button" value="Update info" id="whatever" onclick="window.location.href=('helpdesk_info_update.asp'); ">
</tr>
<tr>
<%
'if submitter exists in database display thier info
If index1 > 0 Then
objRS_UserExists.MoveFirst
Response.Write "<td class='helpdeskdata'>" & objRS_UserExists("submitter_name") & "</td>"
Response.Write "<td> </td>"
Response.Write "<td class='helpdeskdata'>" & objRS_UserExists("submitter_email") & "</td>"
'else display entry form fields
Else
Response.Write "<td><input type=text name=sub_name></td>"
Response.Write "<td> </td>"
Response.Write "<td><input type=text name=sub_email></td>"
End If
objRS_UserExists.Close
Set objRS_UserExists = Nothing
%>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>User First Name</td>
<td> </td>
<td>User Last Name</td>
<td> </td>
<td>User Reference Number</td>
</tr>
<tr>
<td><input type=text name=fname></td>
<td> </td>
<td><input type=text name=lname></td>
<td> </td>
<td><input type=text name=wireless_num></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>Urgency</td>
<td> </td>
<td>Case Type</td>
</tr>
<tr>
<td><select name=urgency>
<option value="Low">Low
<option value="Medium">Medium
<option value="High">High
</select>
</td>
<td> </td>
<td><select name=case_type>
<option value="Request">Request
<option value="Problem">Problem
</select>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td colspan = 5>Problem Subject(50 characters max)</td>
</tr>
<tr>
<td colspan = 5><input type=text name=problem_desc size = 50></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td colspan = 5>Detailed Description</td>
</tr>
<tr>
<td colspan = 5><textarea rows="6" name="detailed_desc" cols="75"></textarea></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><input type=submit value="Submit Ticket"></td>
</tr>
</form>
here is other page where it gets hung up
<% Dim upl %>
<% Set upl = Server.CreateObject("SoftArtisans.FileUp") %>
---------tried to insert something like if upl.form("f1") <> "" then ------- but it wont work. it then just works the opposite way
<% upl.Path = "C:\WUtemp" %>
<% upl.Save %><BR>
<br><br>
<%
Dim Fileup
Fileup = upl.Form("f1").ServerName
%>