Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vbscript
Message
 
To
All
General information
Forum:
Internet
Category:
Active Server Page
Title:
Vbscript
Miscellaneous
Thread ID:
00848221
Message ID:
00848221
Views:
47
hi
i have been playing around with javascript and vbscript to try to do this. the compromise that i have come up with is to have javascript on some asp pages where validation is only needed on a field that has a constant name and use vbscript on fields that are variable. the problem is that i cannot get the code to reference the fields properly.

Dim reqbydate
reqbydate = document.DataEntry.FromDate.Value

If reqbydate = "Click here..." Then
msgBox "Required by date not filled in"
document.DataEntry.FromDate.focus
return
End If

Dim var1, y
y = 1
var1 = "99"
'var1 = 99

msgBox "before for statement"

for y = 1 to 4
var1 = document.DataEntry.qty&y.value

msgBox "inside For"

next
msgBox "end of for statement"
DataEntry.Submit

the first part works fine but the second does not. there is a possibility of 9 lines on a document but this varies and i have to loop through each line and check to see if field qty1, qty2...qty9 have valid numeric entries or not. i have tried many permutations and i really want to do this in code rather than write the code 9 times but if anyone has any suggestions on how to do this, in vb or java, they will be warmly welcomed.
Slán
~M
Go raibh maith agat

~M
Reply
Map
View

Click here to load this message in the networking platform