navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

vbscript error

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> vbscript error
Page: [1]
 
Rizzo

 

Posts: 42
Joined: 12/7/2001
From:
Status: offline

 
vbscript error - 12/13/2001 13:28:40   
Hi, I'm trying to debug my vbscript but having some trouble. I have a form that posts info into another form. The problem is when I leave certain fields blank I get this error.

Microsoft VBScript runtime error '800a000d'
Type mismatch:

Is there any way to tell my page that if there is no value entered into a field then don't give me an error?

'this requests the info from my form
PAY_R = request.form("RATE")
'this is the inital value in my second form
<%= formatnumber((PAY_R)*1) %>



Mojo

 

Posts: 2431
From: Chicago
Status: offline

 
RE: vbscript error - 12/13/2001 15:52:52   
It looks like your trying to multiply without any values if the field is left blank. I would try something like this on the second form:

<%
PAY_R = request.form("RATE")
If Len(PAY_R) < 1 Then PAY_R = 0
%>

Now you will have 1*0 which should at least give you a value.

You could do other things such as:
<%
PAY_R = request.form("RATE")
If Len(PAY_R) < 1 Then
PAY_R = "No value entered"
Else
PAY_R = PAY_R * 1
End If
%>
Now, in your initial value of the form field use:
<%=PAY_R %>

Now, if they leave the field blank on the first form they will see the message. If not, the value will be shown.

Joe

grrr... I had to edit the last response.write


Edited by - jbennett on 12/13/2001 15:58:37

(in reply to Rizzo)
Rizzo

 

Posts: 42
Joined: 12/7/2001
From:
Status: offline

 
RE: vbscript error - 12/13/2001 16:21:13   
Thanks Dude!


(in reply to Rizzo)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> vbscript error
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts