| hwg-basics archives | Mar 2000 | new search | results | previous | next |
Fw: Javascript nightmare!by Nik Robinson <Nikki.Lee.Robinson(at)brunel.ac.uk> |
|
Resent:
----- Original Message -----
From: Nik Robinson <nrobinson(at)iname.com>
To: HWG-Basics <hwg-basics(at)hwg.org>
Sent: 08 March 1997 16:52
Subject: Javascript nightmare!
> Can anyone see where I have gone wrong?
>
> HTML:
>
> <.script>
> function formCheck() {
> if (document.evalform.SLT0.value == "grey")
> {
> document.evalform.vest1.src = "images/vest1-gry.jpg";
> }
> if (document.evalform.SLT0.value == "blue")
> {
> document.evalform.vest1.src = "images/vest1-blu.jpg";
> }
> if (document.evalform.SLT0.value == "red")
> {
> document.evalform.vest1.src = "images/vest1-red.jpg";
> }
> }
> <./script>
>
> then in body:
>
> <FORM NAME="evalform" onSubmit="return false";>
> <IMG NAME="vest1" ALIGN=LEFT HSPACE=5 ALT="" SRC=vest1-red.jpg HEIGHT=133
> WIDTH=104 border="0" >
> <SELECT NAME="SLT0" onBlur="formCheck()">
> <option>red</option>
> <option>blue</option>
> <option>grey</option>
> </SELECT>
>
>
> As you can see depending on what colour is picked in the form I want the
> image to be changed.
>
> Thanks in advance for your help!
>
> Nik Robinson
>
> ***********************************
> E-mail: nrobinson(at)iname.com
> Web site: http://www.nrobinson.co.uk
>
HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA