Welcome to WebmasterWorld Guest from 3.80.4.76

Forum Moderators: ocean10000

Message Too Old, No Replies

Type mismatch: '[string: ""]' error when sending form

     
11:24 pm on Apr 25, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 24, 2006
posts: 193
votes: 0


Hi,

I have no clue about asp and have been asked by a client to create a registration form.

Totally crude, I know, but I've created an image of a calculation question and I'm getting users to add the numbers together and checked against an asp script I have written.

However, when I use it, it gives me the error:

Microsoft VBScript runtime error '800a000d'

Type mismatch: '[string: ""]'

/booking-form/sendit.asp, line 97

Here's the code I've written and the HTML form part that's relevant. Any ideas?

Thanks

HTML

...


<img src="what-is.gif" alt="img-q" width="87" height="19"/><br />
<input type="input" name="captcha" value="" /><br /><br />
<input type="submit" name="submit" value="Submit" class="submit">

...

ASP


<%
' send email if captcha = 12
Dim captcha
captcha = Request.Form("captcha")
if captcha = 12 Then
Dim mail
Set mail = Server.CreateObject("CDONTS.NewMail")
mail.To = EmailTo
mail.From = EmailFrom
mail.Subject = Subject
mail.Body = Body
mail.Send
' redirect to success page
Response.Redirect("ok.htm?" & EmailFrom)
Else
Response.Redirect("error.htm?" & EmailFrom)
End If
%>
2:39 am on Apr 26, 2009 (gmt 0)

Full Member

10+ Year Member

joined:May 14, 2001
posts:262
votes: 0


If Trim(captcha) = "12" Then
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members