Forum Moderators: open

Message Too Old, No Replies

Server Side Error in ASP

Contact page having problems I don't see

         

brett2_UMBC

1:58 am on Apr 22, 2003 (gmt 0)

10+ Year Member



When using the CDONTS ASP code to submit an email through a contact page, I get an error code for IE that happens on line 52 of contactprocess.asp: Object Exptected. What does this mean? What is the problem? My code for contactprocess.asp is posted here:

<link>

Thanks for any help you offer.

~Brett

If you would like to see the error in action for yourself, go here:

<link>

Send an email to Webmaster: Brett Patterson (that's me) and no-one else. The error happens for everyone.

[edited by: Xoc at 3:15 pm (utc) on April 22, 2003]
[edit reason] delinked [/edit]

WebJoe

4:43 am on Apr 22, 2003 (gmt 0)

10+ Year Member



I'd love to help you, but your code seems to be fine. I tested it at the URL you posted and received:


Thank you for your comments WebJoe. If they require a reply, you should receive one soon.

~UMBC EMS

***Home***

brett2_UMBC

5:07 am on Apr 22, 2003 (gmt 0)

10+ Year Member



Would you have any idea as to where to find info to alleviate this error from my computer?

Also, there's another error of the same sort on another page. I've posted the script here. It's basically identical to the contact script with revisions for the stuff entered, but it still comes up as an error.

userpages.umbc.edu/~brett2/addmembersuccessASP.html

Thanks for the help.

~Brett

[edited by: Xoc at 3:16 pm (utc) on April 22, 2003]
[edit reason] delinked [/edit]

markusf

6:12 am on Apr 22, 2003 (gmt 0)

10+ Year Member



works fine for me

brett2_UMBC

6:16 am on Apr 22, 2003 (gmt 0)

10+ Year Member



The add member thing says that the error happens on Line 158 when it process add_success.asp to add_member_success.asp. Any help would be appreciated. I figured out that the contact problem was my side. Thanks for the help.

~Brett

brett2_UMBC

3:23 pm on Apr 22, 2003 (gmt 0)

10+ Year Member



Sorry for that. I apologize for the code posting. Here's the code that I want to execute:

<%
'Gets Form Input
'textarea input, for body of message.
Dim strName, strEmail, strUser
strName = Request.Form("fullname")
strEmail = Request.Form("email")
strUser = Request.Form("username")

'Backup validates the fields if JavaScript failed and redirects back to the form if they're empty
If strName="" or strUser="" or strEmail="" Then Response.Redirect("add_success.asp") End If

'Fire off the email
Dim objMail
Set objMail = CreateObject("CDONTS.NewMail")
With objMail
.From = strName & (strEmail)
.To = "brett2@umbc.edu"
.Subject = "[UMBC EMS] Add Member " & strName & " [UMBC EMS]"
.Body = "Name: " & strName & vbCrLf & "Email: " & strEmail & vbCrLf & vbCrLf & "User: " & strUser & vbCrLf & vbCrLf & Date() & " at " & Time()
.Send
End With
Set objMail = Nothing
%>


When executed it comes up with an error, or it doesnt' and I get no email in my inbox. Does this normally happen with CDONTS? The other strings are coming from the previous page which inserts a record into my DB; however, I have to use a separate page to write an email to myself telling me to update the database and allow them access. Can't I just use the CDONTS mail script (above) and call the values again? Or do I have to copy the values before executing my Insert Record script on the previous page and use each string with the different scripts. Thanks for the help, and sorry about violating the script posting guidelines.

markusf

4:28 pm on Apr 22, 2003 (gmt 0)

10+ Year Member



Create a custom error message page in ASP, then go into IIS and change the default 500 error message to point to that page. Use the url redirect and give a relative path to your file. This way each and every error message on your site can be emailed to you.

brett2_UMBC

5:16 pm on Apr 22, 2003 (gmt 0)

10+ Year Member



Sorry about my ambiguity. I didnt' mean I wanted to be emailed with the error, though thanks for the help because I may do that, but what I wanted was for the form to update the Access database, and email the user info minus the password. Is there a way to do that in two pages? Thanks

~Brett