typing sentence programme problem!! help!!!

[b][red]This message was edited by xingzai at 2006-4-19 3:31:50[/red][/b][hr]We're supposed to do a Typing game on how to learn to speed type using Javascript.The colour of the keyboard will blink when typed.When the user types wrongly,it will blink another colour with a *beep sound.and the wrong character will not appear.

** this is the code that we found and edited but it can only show the blinking of the key whenever we type but it can't detect whether its wrong or not**

Test

promptClear = ""// Clears the prompt line

// Creates 30 "new" arrays.// Each array is one prompt line.//dataSet1 = new Array()dataSet2 = new Array()dataSet3 = new Array()dataSet4 = new Array()dataSet5 = new Array()dataSet6 = new Array()dataSet7 = new Array()dataSet8 = new Array()dataSet9 = new Array()dataSet10 = new Array()

// This script allows the user to select the URL from a 'drop down' list.function dropdownmenu(item){window.location=item.options[item.selectedIndex].value;// Make sure you type a capital "I" in selectIndex.}

// Loads the datSetX arrays into the myLine vaiables used as the prompts.

myLine1 = "aaaa ssss dddd ffff";

myLine2 = "jjjj kkkk llll ;;;;";

myLine3 = "ffff dddd ssss aaaa";

myLine4 = ";;;; llll kkkk jjjj";

myLine5 = "aass ddff jjkk ll;;";

myLine6 = "asas fdfd jkjk lklk";

myLine7 = "a;sl dkfj jfkd ls;a";

myLine8 = "qpwo eiru urie owpq";

myLine9 = "z.x, cmvn nvmc ,x.z";

myLine10 = "zznn xxmm cc,, vv..";

<! The display and input line. >

">

<! Main table containing Keyboard. >

promptNumber = 1;evaluatePrompt();

window.focus()

Untitled Document

**this is the editted code when we're putting the wrong picture for it to blink and using a while to check on the character whether it's wrong or not till the end of the sentence but whenever we put inside it can't work**