petersmith
Technical User
Hi i have this working vb function which i need to call on an onclick event in javascript...
function ValKey(Vin)
dim k, i, s, b
k= ""
if len(Vin) = 7 then
s = UCase(mid(Vin,1,1))
if s = "A" or s = "S" or s = "M" then
b = true
for i = 2 to 7
if not IsNumeric(mid(Vin,i,1)) then b = false
next
if b then k = ucase(Vin)
end if
end if
Valkey = k
end function
can anyone show me how to convert it or get it to work on an onclick event?
kindest thanks.
function ValKey(Vin)
dim k, i, s, b
k= ""
if len(Vin) = 7 then
s = UCase(mid(Vin,1,1))
if s = "A" or s = "S" or s = "M" then
b = true
for i = 2 to 7
if not IsNumeric(mid(Vin,i,1)) then b = false
next
if b then k = ucase(Vin)
end if
end if
Valkey = k
end function
can anyone show me how to convert it or get it to work on an onclick event?
kindest thanks.