using select/option

O

OzThor

I trying to do a webpage that lists 10 items down the left side - on the
right side there is a drop down list of all the answers for each of the 10
questions....
i have that working...
my problem is passing the answer from each question to a javascript function
to check there answer given

below is the code for 1 of the 10 questions as i have it at this time...

i'm having problems working out just which ver stors the answer given??? and
if the vale is a number or a string??

document.write('<tr><td width="50%">')
document.write(I[1][1])
document.write('</td><td>')
document.write('<Select name="+Imatch[1]+">')
document.write('<option value="??????">??????</option>')

for (var y=1; y<11; y++){
document.write('<option
name="'+I[I[y][4]][2]+'">'+I[I[y][4]][2]+'</option>')
}
document.write('</select>')
document.write('<br>')
document.write('</td></tr>')

I[1][1] holds the question
I[1-10][2] holds the list of 10 possible answers
I[1][3] & I[1][4] hold 0 at this time and will be used to keep track of if
it has been answered right etc..

the y[4][2] is a random value i use to shuffle the possible answers befor
building the list...

cold someone please (in plan english) show me how to fix this....
thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top