Product User Response Form<% Public ErrorCount, ErrorMessage, NewPage Public Question1, Question2, Question3, Question4, Question5, Question6, Question7, Question8, Question9, Question10, Question11, Question12, Question13 PageAction = Request.Form("Action") PreviousPage = Request.Form("Page") Select Case PageAction Case "Save" Call StoreVariables(PreviousPage) Call SaveVariables(PreviousPage) NewPage = "Done" Case Else NewPage = "Form" End Select Call DrawPage(NewPage) Sub DrawPage(Page) Select Case Page Case "Form" Response.Write("Thank you for obtaining this USGS/Gap Analysis Program Product. It was produced ""in-house,"" not by a professional publisher so we'd like to take the opportunity to learn from your experience (this is entirely optional). This is an online version of the form found in the readme.txt file on your CD. For any problems you have had, please provide a constructive suggestion on how we can make the product better.") Response.Write("") Case "Done" Response.Write("Done. ") Case Else Response.Write("Else! - Draw Page ") End Select End Sub Sub StoreVariables(Page) Select Case Page Case "Form" Question1 = Trim(Request.Form("Question1")) Question2 = Trim(Request.Form("Question2")) Question3 = Trim(Request.Form("Question3")) Question4 = Trim(Request.Form("Question4")) Question5 = Trim(Request.Form("Question5")) Question6 = Trim(Request.Form("Question6")) Question7 = Trim(Request.Form("Question7")) Question8 = Trim(Request.Form("Question8")) Question9 = Trim(Request.Form("Question9")) Question10 = Trim(Request.Form("Question10")) Question11 = Trim(Request.Form("Question11")) Question12 = Trim(Request.Form("Question12")) Question13 = Trim(Request.Form("Question13")) Case Else Response.Write("Else! - Store Variables ") End Select End Sub Sub CheckVariables(Page) Select Case Page Case Else Response.Write("Else! - Check Variables ") End Select End Sub Sub SaveVariables(Page) Select Case Page Case "Form" Set Mail = Server.CreateObject("Persits.MailSender") Mail.Host = Application("SMTPServer") Mail.From = "gap@uidaho.edu" Mail.FromName = "Web CD Response Form" Mail.Subject = "New Form" Mail.Body = "1. " & CHR(13) & CHR(10) & CHR(13) & CHR(10) & Question1 & CHR(13) & CHR(10) & CHR(13) & CHR(10) & "2. " & CHR(13) & CHR(10) & CHR(13) & CHR(10) & Question2 & CHR(13) & CHR(10) & CHR(13) & CHR(10) & "3. " & CHR(13) & CHR(10) & CHR(13) & CHR(10) & Question3 & CHR(13) & CHR(10) & CHR(13) & CHR(10) & "4. " & CHR(13) & CHR(10) & CHR(13) & CHR(10) & Question4 & CHR(13) & CHR(10) & CHR(13) & CHR(10) & "5. " & CHR(13) & CHR(10) & CHR(13) & CHR(10) & Question5 & CHR(13) & CHR(10) & CHR(13) & CHR(10) & "6. " & CHR(13) & CHR(10) & CHR(13) & CHR(10) & Question6 & CHR(13) & CHR(10) & CHR(13) & CHR(10) & "7. " & CHR(13) & CHR(10) & CHR(13) & CHR(10) & Question7 & CHR(13) & CHR(10) & CHR(13) & CHR(10) & "8. " & CHR(13) & CHR(10) & CHR(13) & CHR(10) & Question8 & CHR(13) & CHR(10) & CHR(13) & CHR(10) & "8. " & CHR(13) & CHR(10) & CHR(13) & CHR(10) & Question8 & CHR(13) & CHR(10) & CHR(13) & CHR(10) & "9. " & CHR(13) & CHR(10) & CHR(13) & CHR(10) & Question9 & CHR(13) & CHR(10) & CHR(13) & CHR(10) & "10. " & CHR(13) & CHR(10) & CHR(13) & CHR(10) & Question10 & CHR(13) & CHR(10) & CHR(13) & CHR(10) & "11. " & CHR(13) & CHR(10) & CHR(13) & CHR(10) & Question11 & CHR(13) & CHR(10) & CHR(13) & CHR(10) & "12. " & CHR(13) & CHR(10) & CHR(13) & CHR(10) & Question12 & CHR(13) & CHR(10) & CHR(13) & CHR(10) & "13. " & CHR(13) & CHR(10) & CHR(13) & CHR(10) & Question13 Mail.AddAddress("jmaxwell@uidaho.edu") Mail.AddAddress("brackney@uidaho.edu") Mail.Send Case Else Response.Write("Else! - Save Variables ") End Select End Sub Private Sub Error() If ErrorCount > 1 Then Response.Write("The following " & ErrorCount & " errors occurred: ") Response.Write("" & ErrorMessage & " ") Else Response.Write("The following " & ErrorCount & " error occurred: ") Response.Write("" & ErrorMessage & " ") End If Response.Write("Please fix the problem, then continue. ") End Sub Private Sub ValidateMaxLength(Name,Value,MaxLength) If Len(Value) > MaxLength Then ErrorCount = ErrorCount + 1 ErrorMessage = ErrorMessage & "" & Name & " can not be longer than " & MaxLength & " characters." End If End Sub Private Sub ValidateNull(Name,Value) If Len(Value) = 0 Then ErrorCount = ErrorCount + 1 ErrorMessage = ErrorMessage & "" & Name & " must be provided. " End If End Sub %> |
Literature | About GAP | Projects and Products | Tools | Meetings | Search | Links | Bulletin Boards | Site Map
USGS ||Gap Analysis Program || NBII
||
Disclaimer || Privacy || Accessibility||
GAP Webmaster ||