|
| |
|
|
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
|
|
|
|
Rizzo
Posts: 42 Joined: 12/7/2001 From: Status: offline
|
RE: vbscript error - 12/13/2001 16:21:13
Thanks Dude!
|
|
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
|
|
|