bokanegro
04-01-2011, 12:44 AM
Hi,
I don't know if this is possible, but I need to try:
http://i56.tinypic.com/2e0mdqg.png
There is one image with numbers on it, to be precise sequence of numbers. I have two lists also (number lists), one with answers ( empty at this moment) and the other one with offered numbers, like this
Offered list:
<ul id="offer">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
</ul>
Answer list:
<ul id="answer">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
I need some instructions how can I onClick in list offer, copy clicked item into other list answer, but it must have same order as on image. If wrong number clicked, add class error.
For example: On image first number is 3, if user click on number 3 in list offer, number will be copied in list answer on first place. If user click on any other number, on clicked number will be added error class.
And everything again, in circle , until user order all numbers as on image. The data for the list will come from the database, but must be validated with JavaScript without reloading the page.
Do I need to use hidden values, or something like that? I am grateful for any help.
Thanks for your time
I don't know if this is possible, but I need to try:
http://i56.tinypic.com/2e0mdqg.png
There is one image with numbers on it, to be precise sequence of numbers. I have two lists also (number lists), one with answers ( empty at this moment) and the other one with offered numbers, like this
Offered list:
<ul id="offer">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
</ul>
Answer list:
<ul id="answer">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
I need some instructions how can I onClick in list offer, copy clicked item into other list answer, but it must have same order as on image. If wrong number clicked, add class error.
For example: On image first number is 3, if user click on number 3 in list offer, number will be copied in list answer on first place. If user click on any other number, on clicked number will be added error class.
And everything again, in circle , until user order all numbers as on image. The data for the list will come from the database, but must be validated with JavaScript without reloading the page.
Do I need to use hidden values, or something like that? I am grateful for any help.
Thanks for your time