deadlock Message Board
[ August Full List | Reply ]

Problem with a Javascript question&answer script
From Gwen on 17 August '00
I keep reading different tutorial on javascript but I can't
find an answer. Below is a script I need so badly but it
won't work. I have tried to change answer(who.value) to
result(who.value) and ans(who.value) but it will not
recognize the array I made ans[]
I know for someone that knows javascript instead of
trying to learn as I go, this may seem easy and a
silly question. But I really need to find the answer.


function answer() {
result=""
for (var i=0; i<ans.length; i++) {
result = ans[i]
}

}

var reset=""


// -->

</script>
</head>

<BODY>


<FORM name=question>
<TEXTAREA COLS=40 ROWS=3 WRAP="hard" name=who value=""></TEXTAREA>
<input type=button value="result" onClick="answer(who.value)">




Reply to this message

Required Details
Your name:
Subject:

Optional Details
Home page title:
Home page URL:
Email:
(if you'd like to receive automatic replies by email)

Your Message
>