?
Solved

Web Form in ASP (need help with changing some fields and what not) ...

Posted on 2005-03-21
12
Medium Priority
?
294 Views
Last Modified: 2008-02-01
Hi:  

I have a website that contains a web form within that site.  I asked eariler if it was OK to post working URLs when asking for help (to make the troubleshooting process easier), and I was told that it was within the EE rules to do so.  Here is a link to my website and working web form:

http://brooks.sfcti.com

NOTE:  once at this URL, click on the link to go to the, "Daily Progress Report Form" (this is located in the middle of the screen).  When prompted for a username/password, the information is:

username: brooks
password: student

NOTE:  This was one of my questions (how can I make this web form work without it requring the end user to be in a username and password).

Background:
This website and web form were both created by me using Front Page 2003.  My hosted account is on a Red Hat Linux server with Front Page Extensions turned on.

What I would like to accomplish with this posting on EE is the following:

1.  When a person fills out the form and hits the submit button, I get the results emailed to me.  I woud like it so that when I get the email, the person's name who filled out the form is inserted into the subject line instead of what I get now (which is):

"Daily Progress Report Submission"

I would also like for the subject to contain if possible the class the person is in whom is filling out the web form (this is selected from the drop down box at the very top of the form).

Thanks in advance for your time and help!

Shawn
0
Comment
Question by:pugdog_fan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 4
12 Comments
 
LVL 1

Expert Comment

by:gianitoo
ID: 13597446
i would assume that in your page or folder in the server it was set up to make it password protected.

you might have to ask your server admin  to disable this.



0
 
LVL 1

Author Comment

by:pugdog_fan
ID: 13656536
Since I got no valid acceptable answer for this question, can you please CLOSE it witihout awarding any points?
0
 
LVL 1

Expert Comment

by:gianitoo
ID: 13656673
for your form it is quite easy......for the upload you might need to get aspupload to do 2 files
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:gianitoo
ID: 13656679
0
 
LVL 1

Assisted Solution

by:gianitoo
gianitoo earned 1500 total points
ID: 13656692
this is a code demo for your form


<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<%
'Dimension variables
Dim objCDOSYSCon
   
'Create the e-mail server object
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
'Set and update fields properties
'Out going SMTP server
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "192.168.111.2"
'SMTP port
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 25
'CDO Port
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Timeout
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objCDOSYSCon.Fields.Update

'Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSCon
'Who the e-mail is from
objCDOSYSMail.From = request.Form("email")
'Who the e-mail is sent to
objCDOSYSMail.To = "CHayse@planetrcraceway.com"
'The subject of the e-mail
objCDOSYSMail.Subject = "Message from Planet RC Raceway Website"
'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
objCDOSYSMail.TextBody = Chr(13) & Chr(10) &_
"Name: " & cStr(Request("name")) & Chr(13) & Chr(10) &vbcrl&_
"Phone: " & cStr(Request("Phone")) & Chr(13) & Chr(10) &vbcrl&_

"Message: " & cStr(Request("Message")) & Chr(13) & Chr(10) &vbcrl&_
": " & cStr(Request(""))
If (cStr(Request("Submit")) <> "") Then
objCDOSYSMail.Send
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing
Response.Redirect "contact.asp?message=Your message has been succesfully sent"
End If
%>
0
 
LVL 1

Author Comment

by:pugdog_fan
ID: 13656733
Wow ... that was nice of you ...

Should I simply copy/paste the above HTML information into Front Page to make a new page?

I am guessing that all that CODE goes in between the <body> and the </body> tags?

Shawn
0
 
LVL 1

Expert Comment

by:gianitoo
ID: 13656748
the code i sent you goes on top of the page..

the body should have just the form that you currently have in html

make sure you save your page as      page.asp

send me your current code and i see what i can do
0
 
LVL 1

Author Comment

by:pugdog_fan
ID: 13657427
Pasted below the --- line is the 'code' for the current page I have up and running.  I would like to crop yours into place as needed to test.

-----------------------------------

html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Daily Progress Report Form</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body>

<form method="POST" enctype="multipart/form-data" action="_vti_bin/shtml.exe/uploading.htm" onSubmit="" webbot-action="--WEBBOT-SELF--">
      <!--webbot bot="FileUpload" U-File="_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" S-Destination="lab/" startspan B-Reverse-Chronology="FALSE" S-Email-Format="TEXT/PRE" S-Email-Address="sfrye@sfcti.com" B-Email-Label-Fields="TRUE" B-Email-Subject-From-Field="FALSE" S-Email-Subject="Daily Progress Report Submission" S-Category S-Assignedto S-ReviewStatus B-Process-MetaInfo="FALSE" S-Builtin-Fields --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><input TYPE="hidden" NAME="_charset_" VALUE="windows-1252"><!--webbot bot="FileUpload" endspan i-checksum="58985" -->
      <p align="center"><b><font size="5">Daily Progress Report</font></b></p>
      <p>Name: <input type="text" name="T1" size="20">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      Class:&nbsp;&nbsp;&nbsp; <select size="1" name="D1">
      <option>NT102 Microsoft Office I</option>
      <option>NT104 Network Fundamentals</option>
      <option>NT201 Net. Fund. NET+</option>
      </select></p>
      <p>Date:&nbsp;&nbsp; <input type="text" name="T2" size="20"></p>
      <p>Summary: <textarea rows="3" name="S1" cols="117"></textarea></p>
      <p>Optional:</p>
      <p><textarea rows="3" name="S2" cols="117"></textarea></p>
      <p>TYS: <input type="file" name="F1" size="118"></p>
      <p>LAB: <input type="file" name="F2" size="118"></p>
      <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

<p align="center"><a href="http://brooks.sfcti.com/"><font size="5">Return to
Class Website</font></a></p>

</body>

</html>
0
 
LVL 1

Author Comment

by:pugdog_fan
ID: 13694971
wow ... thanks so much for your time and help, but really it didn't work completely when I tried to use it.  This is what I did.

1.  I created a new blank web page called index.asp
2.  I copied and pasted all your information from above into the new page.
3.  I saved the page and uploaded it to my site.
4.  I was able to get to the page just fine and fill out the form, but when I hit the submit button, I got the a Page Cannot be displayed error
with this as the URL:

http://sfcti.com/sendme/--WEBBOT-SELF--

If you want, you can go to the page yourself and see what I mean:

http://sfcti.com/sendme/index.asp

If you are prompted for a username/password:

username: brooks
password: student

Thanks so much, sir ... we are VERY close!

0
 
LVL 1

Expert Comment

by:gianitoo
ID: 13697963
sorry i was out of town....let me see your code right now
0
 
LVL 1

Expert Comment

by:gianitoo
ID: 13697974
who is hosting your website???  does it support asp?
0
 
LVL 1

Accepted Solution

by:
gianitoo earned 1500 total points
ID: 13698106
this how your code should look like...  

you might have to edit this line with your own smpt server
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "192.168.111.2"

the upload to email are totally different questions....perhaps ask a new question and post this code and somebody else might be able to help you.


<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
'Dimension variables
Dim objCDOSYSCon
   
'Create the e-mail server object
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
'Set and update fields properties
'Out going SMTP server
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "192.168.111.2"
'SMTP port
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 25
'CDO Port
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Timeout
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objCDOSYSCon.Fields.Update

'Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSCon
'Who the e-mail is from
objCDOSYSMail.From = request.Form("email")
'Who the e-mail is sent to
objCDOSYSMail.To = "CHayse@planetrcraceway.com"
'The subject of the e-mail
objCDOSYSMail.Subject = "Message from Planet RC Raceway Website"
'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
objCDOSYSMail.TextBody = Chr(13) & Chr(10) &_
"Name: " & cStr(Request("name")) & Chr(13) & Chr(10) &vbcrl&_
"class: " & cStr(Request("class")) & Chr(13) & Chr(10) &vbcrl&_

"date: " & cStr(Request("date")) & Chr(13) & Chr(10) &vbcrl&_
"Summary: " & cStr(Request("Summary")) & Chr(13) & Chr(10) &vbcrl&_
"Optional: " & cStr(Request("Optional")) & Chr(13) & Chr(10) &vbcrl&_

": " & cStr(Request(""))
If (cStr(Request("Submit")) <> "") Then
objCDOSYSMail.Send
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing
Response.Redirect "thanks.asp?message=Your message has been succesfully sent"
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>


<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Daily Progress Report Form</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body>

<form method="POST" enctype="multipart/form-data" action="_vti_bin/shtml.exe/uploading.htm" onSubmit="" webbot-action="--WEBBOT-SELF--">
     <!--webbot bot="FileUpload" U-File="_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" S-Destination="lab/" startspan B-Reverse-Chronology="FALSE" S-Email-Format="TEXT/PRE" S-Email-Address="sfrye@sfcti.com" B-Email-Label-Fields="TRUE" B-Email-Subject-From-Field="FALSE" S-Email-Subject="Daily Progress Report Submission" S-Category S-Assignedto S-ReviewStatus B-Process-MetaInfo="FALSE" S-Builtin-Fields --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><input TYPE="hidden" NAME="_charset_" VALUE="windows-1252"><!--webbot bot="FileUpload" endspan i-checksum="58985" -->
     <p align="center"><b><font size="5">Daily Progress Report</font></b></p>
     <p>Name: <input name="name" type="text" id="name" size="20">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
     <p>Email:
       <input name="email" type="text" id="email">
     </p>
     <p>Class:&nbsp;&nbsp;&nbsp;
     <select name="class" size="1" id="class">
       <option>NT102 Microsoft Office I</option>
       <option>NT104 Network Fundamentals</option>
       <option>NT201 Net. Fund. NET+</option>
     </select>
  </p>
     <p>Date:&nbsp;&nbsp; <input name="Date" type="text" id="Date" size="20">
     </p>
     <p>Summary: <textarea name="Summary" cols="117" rows="3" id="Summary"></textarea>
     </p>
     <p>Optional:</p>
     <p><textarea name="Optional" cols="117" rows="3" id="Optional"></textarea>
     </p>
     <p>TYS: <input name="TYS" type="file" id="TYS" size="118">
     </p>
     <p>LAB: <input name="Lab" type="file" id="Lab" size="118">
     </p>
     <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

<p align="center"><a href="http://brooks.sfcti.com/"><font size="5">Return to
Class Website</font></a></p>

</body>

</html>
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question