<HTML> <HEAD> <TITLE>......</TITLE> <HEAD> <SCRIPT language='JavaScript'> function dress (property0, property1, property2) <-- This is an empty object { this.materiaal = property0; this.kleur = property1; this.maat = property2; } function test (veld1,veld2,veld3,veld4,veld5,veld6) { veld1.value = sweaterD.materiaal; if ( sweaterD.kleur == 'geel') {veld2.value = 'ja'} else {veld2.value = 'nee'}; if ( sweaterA.kleur == 'zwart') {veld3.value = 'A zwart'} else {veld3.value = 'A niet zwart'}; if ( sweaterB.kleur == 'rood') {veld4.value = 'B rood'} else {veld4.value = 'B niet rood'}; veld5.value = veld2.value; veld6.value = sweaterA.kleur; } </SCRIPT> <BODY> xxxx<BR> xxxx<BR> xxxx<BR> <SCRIPT language='JavaScript'> sweaterA = new dress('katoen','geel','M'); sweaterB = new dress('zijde','geel','L'); sweaterC = new dress('katoen','zwart','S'); sweaterD = new dress('wol','geel','M'); </SCRIPT> xxxx<BR> xxxx<BR> xxxx<BR> <FORM NAME='A8'> <INPUT TYPE='button' VALUE="Display outcome of the rules: 'yes' of 'no' or some thing else" ONCLICK="test(A8.stof, A8.jaNee, A8.v3, A8.v4, A8.v5, A8.v6)"><BR> sweaterD materiaal: <INPUT TYPE='value' NAME='stof' SIZE=10><BR> sweaterD kleur geel: <INPUT TYPE='value' NAME='jaNee' SIZE=10><BR> sweaterA kleur zwart: <INPUT TYPE='value' NAME='v3' SIZE=16><BR> sweaterB kleur rood: <INPUT TYPE='value' NAME='v4' SIZE=16><BR> gelijk aan veld2: <INPUT TYPE='value' NAME='v5' SIZE=10><BR> sweaterA kleur: <INPUT TYPE='value' NAME='v6' SIZE=10><BR> </FORM> xxxx<BR> xxxx<BR> xxxx<BR> </BODY> </HTML>
Enschede, 5 januari 2001; updated: jan 28, 2003.