|
| |||||||
![]() | Welcome to iWEBTOOL Talk, where you talk about
webmaster-related stuff.
1 Register
2 Browse the board
3 Discuss whatever may interest you! | |||||||||||||
![]() |
| | Thread Tools | Search this Thread | Display Modes |
| | #1 |
| Smurf Join Date: Feb 2008
Posts: 2
![]() | Hi, I wounder if somone could help i'm getting the following error when trying to submit a form Microsoft VBScript runtime error '800a01f4' Variable is undefined: 'oMail' /SubmitCatalogueRequest.asp, line 4 Many thanks David. |
| | |
|
| |||||||
| | #2 |
| iWEBTOOL Moderator Join Date: Nov 2006 Location: Ayr, Scotland
Posts: 904
![]() ![]() | I assume your attempting to run an asp page. This error usually means that a variable has been created, but has not been defined with a dim statement. Often this includes ADO constants, such as adOpenForwardOnly and adLockOptimistic.
__________________ |
| | |
| | #3 |
| Smurf Join Date: Feb 2008
Posts: 2
![]() | Hi I'm working on a site created by someone else, i'm very new to ASP. here is the code: <% Option Explicit %> <% Set oMail = Server.CreateObject("CDO.Message") Set oMailConfig = Server.CreateObject ("CDO.Configuration") oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 oMailConfig.Fields.Update 'set the mail parameters sMessage = "The following catalogue request has been sent via the MWS Website:" & chr(13) & chr(10) & chr(13) & chr(10) sMessage = sMessage & "Name: " & request.form.item("name") & chr(13) & chr(10) & chr(13) & chr(10) sMessage = sMessage & "Address: " & request.form.item("address") & chr(13) & chr(10) & chr(13) & chr(10) sMessage = sMessage & "Telephone Number: " & request.form.item("telephone") & chr(13) & chr(10) & chr(13) & chr(10) sFrom = request.form.item("emailAddress") sMessage = sMessage & "Email address: " & sFrom & chr(13) & chr(10) & chr(13) & chr(10) Set oMail.Configuration = oMailConfig oMail.From = "mwsWebsite@mwsltd.co.uk" oMail.To = "sales@mwsltd.co.uk" oMail.Subject = "MWS Catalogue Request Form" oMail.HTMLBody = sMessage oMail.Send Set oMail = Nothing Set oMailConfig = Nothing response.redirect("Confirmation.asp") Many thanks for the help |
| | |
| | #4 |
| iWEBTOOL Moderator Join Date: Nov 2006 Location: Ayr, Scotland
Posts: 904
![]() ![]() | By default, Microsoft's VBScript lets you implicitly declare variables in your code. You have <% Option Explicit %> at the top of your code, the <% OPTION EXPLICIT %> function to require that all variables be declared first. I use a similar routine and do not use <% Option Explicit %>, try removing this as a first step, failing that you need to define the variable, use Dim = oMail before the Set oMail = ...
__________________ |
| | |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| University.ms | stevefrancis711 | Domains for Sale | 0 | 10-18-2007 10:53 PM |
| Simple stupid question for MS Frontpage | website-submit.org | HTML | 4 | 03-30-2007 05:51 PM |
| sexz.ms ? New Member 1rst post | ZEROB41 | Domain Appraisals | 0 | 03-25-2007 08:30 AM |
| Hello from MS, USA | Johnni | Introduce yourself | 5 | 12-13-2006 09:19 PM |
| Website Content Databases - MySQL & MS Access | odditysoftware | Websites for Sale | 115 | 11-28-2006 09:19 PM |