I tried to use this script to validate the input of the form Ford.
When I use the Input ype Button the script is OK
I want to use a picture as a button but then the script does not function.
Can someone help me a little.
Thanks in advance
Marcel
<INPUT TYPE="image" SRC="transport. gif" NAME="Trans" BORDER="0">
<SCRIPT LANGUAGE=VBScri pt>
Sub Trans_OnClick()
'Validate all fields contain data
If Len(Ford.Nam.va lue)=0 THEN
Alert "You need to fill out your Name !"
Ford.Nam.focus
Exit Sub
Elseif Len(Ford.Carnr. value)=0 THEN
Alert "You need to fill out your Carnumber!"
Ford.Carnr.focu s
Exit Sub
End If
Call Trans.submit()
End Sub
</SCRIPT>
When I use the Input ype Button the script is OK
I want to use a picture as a button but then the script does not function.
Can someone help me a little.
Thanks in advance
Marcel
<INPUT TYPE="image" SRC="transport. gif" NAME="Trans" BORDER="0">
<SCRIPT LANGUAGE=VBScri pt>
Sub Trans_OnClick()
'Validate all fields contain data
If Len(Ford.Nam.va lue)=0 THEN
Alert "You need to fill out your Name !"
Ford.Nam.focus
Exit Sub
Elseif Len(Ford.Carnr. value)=0 THEN
Alert "You need to fill out your Carnumber!"
Ford.Carnr.focu s
Exit Sub
End If
Call Trans.submit()
End Sub
</SCRIPT>
Comment