Outsourced code 2 for Vocab Activity

This code is the second outsourced code for the vocab activity. It is intended for us to study and to use the best features for building the classes vocabulary activity. Students wishing to play with the actual javascript code on their own sub-site should copy the liam.js into their own directory and change the path name in the tago21.html file.

data21.js

var wordTest = {
    "Words": {
        "Word": [
      {
          "Entry": "Saluton",
          "EnglishSentence": "Hello",
          "EsperantoSentence": "Saluton",
          "PossibleAnswers": {
              "PossibleAnswer": [
            "Bonan vesperon",
            "Ĝis revido",
            "Pacon!",
            "Bonan matenon",
            "Bone",
            "Dankon",
            "Bonvolu"
          ]
          }
      },
      {
          "Entry": "Jes",
          "EnglishSentence": "Yes",
          "EsperantoSentence": "Jes",
          "PossibleAnswers": {
              "PossibleAnswer": [
            "Bonan vesperon",
            "Bone",
            "Pacon",
            "Bonan matenon",
            "Ne",
            "Dankon",
            "Bonvolu"
          ]
          }
      },
      {
          "Entry": "Ne",
          "EnglishSentence": "No",
          "EsperantoSentence": "Ne",
          "PossibleAnswers": {
              "PossibleAnswer": [
            "Bonan vesperon",
            "Bone",
            "Nenio",
            "Bonan matenon",
            "Jes",
            "Dankon",
            "Nul"
          ]
          }
      },
      {
          "Entry": "Bonan matenon",
          "EnglishSentence": "Good morning",
          "EsperantoSentence": "Bonan matenon",
          "PossibleAnswers": {
              "PossibleAnswer": [
            "Bonan vesperon",
            "Ĝis revido",
            "Pacon!",
            "Saluton",
            "Bone",
            "Dankon",
            "Bonvolu"
          ]
          }
      },
      {
          "Entry": "Bonan vesperon",
          "EnglishSentence": "Good evening",
          "EsperantoSentence": "Bonan vesperon",
          "PossibleAnswers": {
              "PossibleAnswer": [
            "Saluton",
            "Ĝis revido",
            "Pacon!",
            "Bonan matenon",
            "Bone",
            "Dankon",
            "Bonvolu"
          ]
          }
      },

      {
          "Entry": "Bone",
          "EnglishSentence": "All right",
          "EsperantoSentence": "Bone",
          "PossibleAnswers": {
              "PossibleAnswer": [
            "Bonan vesperon",
            "Ĝis revido",
            "Pacon!",
            "Bonan matenon",
            "Saluton",
            "Dankon",
            "Bonvolu"
          ]
          }
      },

      {
          "Entry": "Dankon",
          "EnglishSentence": "Thank you",
          "EsperantoSentence": "Dankon",
          "PossibleAnswers": {
              "PossibleAnswer": [
            "Bonan vesperon",
            "Ĝis revido",
            "Pacon!",
            "Bonan matenon",
            "Bone",
            "Saluton",
            "Bonvolu"
          ]
          }
      },
      {
          "Entry": "Bonvolu",
          "EnglishSentence": "Please",
          "EsperantoSentence": "Bonvolu",
          "PossibleAnswers": {
              "PossibleAnswer": [
            "Bonan vesperon",
            "Ĝis revido",
            "Pacon!",
            "Bonan matenon",
            "Bone",
            "Dankon",
            "Sanon"
          ]
          }
      }
    ]
    }
};

tago21.html

<!doctype html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="Pragma" content="no-cache" />
        <meta http-equiv="Expires" content="-1" />
        <title>Esperanto Word Test</title>
        <link rel="stylesheet" href="http://bazaesperanto.com/css/liam.css" />
        <script src="http://bazaesperanto.com/js/modernizr-2.5.3.min.js"></script>
        <script src="http://bazaesperanto.com/js/jquery-1.7.2.js"></script>
        <script type="text/javascript" src="data21.js"></script>
        <script type="text/javascript" src="http://bazaesperanto.com/js/liam.js"></script>
        <script>
            // Add an event handler for when the window loads.
            $(document).ready(eventWindowLoaded);
        </script>
    </head>
    <body>
        <div id="bannerPanel" class="bannerPanel">Esperanto Knowledge Test</div>
        <br />
        <div id="instructionsPanel" class="instructionsPanel">
            <h2>Instructions</h2>
            <p>Any instructions go here</p>
            <button id="startTestCommandButton">Start Test</button>
        </div>
        <div id="test" class="testPanel">
            <table>
                <tr>
                    <td>English:</td>
                    <td id="englishSentence"></td>
                </tr>
                <tr>
                    <td>Esperanto:</td>
                    <td><span id="phrasePrefix"></span><input id="inputTextBox" /><span id="phraseSuffix"></span></td>
                    <td><button id="nextWordCommandButton">Check Answer</button></td>
                </tr>
            </table>
            <br />
            <p id="result"></p>
            <br />
            <div id="wordListBlock">
                <ul id="wordsList" class="wordList">
                </ul>
            </div>
        </div>
    </body>
</html>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s