Hi everybody,
Thanks to a user, I have got this exemple. I used it to do a quiz. A user answers this quiz and you will be given his score. In this exemple he must get the different languages in the good order (for instance: Russian, French, English, and Italian). So far it works, but I don't know how to do the javascript to obtain the score.
Script of the button (click_event):
for (var i = 0; i < ListBox1.length; i++)
{
if (ListBox1.getItemState(i))
{
ListBox2.addItem(ListBox1.getDisplayItem(i), ListBox1.getSaveItem(i));
}
}
for (var i = ListBox1.length; i >= 0; i--)
{
if (ListBox1.getItemState(i))
{
ListBox1.deleteItem(i);
}
}
Script of the listbox (change_event)
for (var i = 0; i < this.items.nodes.length; i++)
{
if (xfa.event.change == this.items.nodes.item(i).value)
{
XFAUtil.setProperty(this, "selectedIndex", i, XFAUtil.ContentType.Integer);
break;
}
}
Script of the total box (?_event)
Now it's your turn!
Any help will be appreciated
Many thanks