| Re: Button to validate input -
06-04-2007, 09:31 AM
Do not respond, I found a solution!
"Basr" <EMAIL REMOVED> schreef in bericht
news:451e5c85$0$2023$EMAIL REMOVED. ..
> 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=VBScript>
>
> Sub Trans_OnClick()
>
> 'Validate all fields contain data
>
> If Len(Ford.Nam.value)=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.focus
>
> Exit Sub
>
>
>
> End If
>
> Call Trans.submit()
>
> End Sub
>
> </SCRIPT>
>
> |