Using Java Script to identify what has been typed in a free text box in an assessment question
I am currently building an assessment for the end of one of my courses and one of the questions requires a free text box where the user can type in their answer to the question. The user has two attempts to get the answer correct by typing in the correct list of objects. I was wondering how you would use Java Script to recognise whether the user has typed in the correct words?
For example if the question was; Name four farm animals.
Answer: Pig, cow, chicken, sheep.
If the user typed in Pig, cow, dolphin, unicorn, I want storyline to be able to recognise what they have typed and to know that they got two correct but two wrong so need to try again.
Sorry if that makes little sense! I am getting confused trying to explain it.
If any one has any advice it would be much appreciated.
PS I am not new to Storyline but I am new to Java Script so have no idea how to use it.