Fw: Javascript nightmare!
by Nik Robinson <Nikki.Lee.Robinson(at)brunel.ac.uk>
|
| Date: |
Thu, 9 Mar 2000 14:48:33 -0000 |
| To: |
HWG-Basics <hwg-basics(at)hwg.org> |
| |
todo: View
Thread,
Original
|
|
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
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.