Jokier
02-24-04, 02:11 PM
Hello!
I have created a form validator that works perfectly on any PC but for some reason it does not work on a mac (IE 5.1) It just lets the subscription pass right through without doing anything. Please help me with this: how do I make the script work on every computer there is?
I've just this script below:
<script language="VBScript">
dim validation
Function anmalan_OnSubmit
validation = true
if len(document.anmalan.namn.Value) < 3 then
msgbox "Fyll i ett fullständigt namn"
validation = false
end if
if InStr(document.anmalan.namn.value," ") = 0 then
msgbox "Fyll i både för- och efternamn, tack."
validation = false
end if
if len(document.anmalan.kontakt.value) < 5 then
msgbox "Fyll i fullständig kontaktinformation"
validation = false
end if
if (document.anmalan.kontakt.value) = "" then
msgbox "Var vänlig fyll i din kontaktinformation."
validation = false
end if
if not isnumeric(document.anmalan.termin.value) then
msgbox "Fyll i vilken termin du går med siffror tack"
validation = false
end if
if (document.anmalan.termin.value) = "" then
msgbox "Fyll i vilken termin du läser"
validation = false
end if
if validation = true then
anmalan_OnSubmit = true
else
anmalan_OnSubmit = false
end if
if anmalan_Onsubmit = true then
msgbox "Tack för din anmälan, kontrollera att ditt namn finns med och att uppgifterna stämmer på nästa sida"
end if
end Function
</script>
Thanks in advance!
Jokier
I have created a form validator that works perfectly on any PC but for some reason it does not work on a mac (IE 5.1) It just lets the subscription pass right through without doing anything. Please help me with this: how do I make the script work on every computer there is?
I've just this script below:
<script language="VBScript">
dim validation
Function anmalan_OnSubmit
validation = true
if len(document.anmalan.namn.Value) < 3 then
msgbox "Fyll i ett fullständigt namn"
validation = false
end if
if InStr(document.anmalan.namn.value," ") = 0 then
msgbox "Fyll i både för- och efternamn, tack."
validation = false
end if
if len(document.anmalan.kontakt.value) < 5 then
msgbox "Fyll i fullständig kontaktinformation"
validation = false
end if
if (document.anmalan.kontakt.value) = "" then
msgbox "Var vänlig fyll i din kontaktinformation."
validation = false
end if
if not isnumeric(document.anmalan.termin.value) then
msgbox "Fyll i vilken termin du går med siffror tack"
validation = false
end if
if (document.anmalan.termin.value) = "" then
msgbox "Fyll i vilken termin du läser"
validation = false
end if
if validation = true then
anmalan_OnSubmit = true
else
anmalan_OnSubmit = false
end if
if anmalan_Onsubmit = true then
msgbox "Tack för din anmälan, kontrollera att ditt namn finns med och att uppgifterna stämmer på nästa sida"
end if
end Function
</script>
Thanks in advance!
Jokier