Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8479145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:56:35+00:00 2026-06-10T18:56:35+00:00

In my spelling game new words will be added all the time so there

  • 0

In my spelling game new words will be added all the time so there is always a fresh selection of words to spell.

Each word added to the game has a “src” to an image and a sound that will prompts the user into getting the spelling correct in gameplay.

When I have completed making the game, the job of adding the new words in is down to one of my colleagues. This means he will have to add a link for the pic and audio as well as the word.

As they have little knowledge with this sort of thing I want to make it as easy as possible for him to add the images and sounds when adding the words I want to create a default path to a shared location where he will store all this stuff.

This way he can just type in “bug” for the word, “.bug-pic” for the picture and “.bug-audio” for the sound making it simple for him to add into the HTML.

Is this the best way to do it?

What would be the simplest way for them to input these things?

Here is how I store the word, sound and image at the moment…

<ul style="display:none;" id="wordlist">

    <li data-word="mum" data-audio="file:///C:/smilburn/AudioClips/mum.wav" data-pic="http://www.clker.com/cliparts/5/e/7/f/1195445022768793934Gerald_G_Lady_Face_Cartoon_1.svg.med.png"></li>

    <li data-word="cat" data-audio="file:///C:/smilburn/AudioClips/cat.wav" data-pic="http://www.clker.com/cliparts/c/9/9/5/119543969236915703Gerald_G_Cartoon_Cat_Face.svg.med.png"></li>

    <li data-word="dog" data-audio="file:///C:/smilburn/AudioClips/dog.wav" data-pic="http://www.clker.com/cliparts/e/9/4/1/1195440435939167766Gerald_G_Dog_Face_Cartoon_-_World_Label_1.svg.med.png"></li>

    <li data-word="bug" data-audio="file:///C:/smilburn/AudioClips/bug.wav" data-pic="http://www.clker.com/cliparts/4/b/4/2/1216180545881311858laurent_scarabe.svg.med.png"></li>

    <li data-word="rat" data-audio="file:///C:/smilburn/AudioClips/rat.wav" data-pic="http://www.clker.com/cliparts/C/j/X/e/k/D/mouse-md.png"></li>

    <li data-word="dad" data-audio="file:///C:/smilburn/AudioClips/dad.wav" data-pic="http://www.clker.com/cliparts/H/I/n/C/p/Z/bald-man-face-with-a-mustache-md.png"></li>

  </ul>

THANKS

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:56:37+00:00Added an answer on June 10, 2026 at 6:56 pm

    I’m going to break your mold a bit here, and suggest something that looks simple enough for me in the long run (at least, simpler than what you have here).

    The problems with using HTML markup to store your words is that:

    1. it’s HTML — the browser will have to parse this, but then not display it because you’ve got the <ul> element as display:none (it’s just sort of wasted effort), and
    2. XML (or HTML, whichever) is pretty bloated, in the sense that there’s a lot of text needed to represent information. If you’re going for a spelling game, I’m assuming that you’ll have hundreds, or thousands of such words, and the HTML representation for your words will be a huge crapload of bandwidth bloat.

    So! Here’s what I’d suggest:

    // create an external JS file to store your words,
    // let's say, [words.js].
    
    // then let's just store your words in an array
    var words = [
        { word : "foo" , audio : "file:///C:/smilburn/AudioClips/foo.wav", pic : "http://www.clker.com/cliparts/5/e/7/f/1195445022768793934Gerald_G_Lady_Face_Cartoon_1.svg.med.png" },
        { word : "bar" , audio : "file:///C:/smilburn/AudioClips/bar.wav", pic : "http://www.clker.com/cliparts/5/e/7/f/1195445022768793934Gerald_G_Lady_Face_Cartoon_1.svg.med.png" },
        { word : "mum" , audio : "file:///C:/smilburn/AudioClips/mum.wav", pic : "http://www.clker.com/cliparts/5/e/7/f/1195445022768793934Gerald_G_Lady_Face_Cartoon_1.svg.med.png" }
    ];
    

    It’s just a plain Javascript array that holds a collection of Javascript objects. Each object has three properties: word, audio and pic.

    Load that file into your page, and have a script read from that. It’ll be much easier and faster to traverse, use and apply to your page. Reading to and fro a JS object is generally faster than having to parse and read the same information from the DOM.

    Additionally, the markup is more compact, and you’re not [misusing] HTML DOM for something it (arguably) wasn’t supposed to be doing.

    Thirdly, it’s much more organized and cleaner to look at than HTML markup, and I imagine that that will be much easier for your colleagues to update and adapt to.

    Lastly, one nice thing about this approach is how easy it is to write your code into modules, so you can work with stuff like expansions / word packs easier:

    // something like this can work:
    
    // [words.js]
    var words = [
        // some base words
        { word : "foo", audio : "foo.wmv", pic : "foo.pic" }
        // ...
    ];
    
    // [words.animals.js]
    (function () {
        // do not do anything if the base [words.js] isn't loaded
        if (!words) { return; }
    
        // extend the base words
        words = words.concat([
            // new animal words!
            { word : "dog", audio : "bark.wmv", pic : "brian.jpg" }
            // ...
        ]);
    
    })();
    

    The idea being, you can load the words.js file into your game and it’ll work perfectly. However, if the user would also like to add new words (say, words for animals) then they (you) can just load auxiliary files to augment your base words list.

    This is much easier to do with JS objects than with HTML markup.

    EDIT

    If you really positively final-answer must have to use HTML, I recommend chopping off the data-word attribute off your <li> and just use it’s text value instead.

    <li data-audio="dog.wmv" data-pic="dog.jpg">dog</li>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my spelling game there is a grid with words in to spell. The
I accidentally added a word I'm forever mis-spelling into Eclipse's spell-checker dictionary. How do
In my spelling game there is a grid that is populated with words. The
In my spelling game there is a grid populated with hidden words. The aim
In my spelling game there is a grid that is populated with words that
In my spelling game the user clicks on the letters to spell the word.
In my spelling game there are different size words from 3-6. Once a certain
Is there any way to check spelling for ALL the words that I type
In my spelling game, when a letter is complete I want the next word
In my spelling game, when a word is complete it fades away in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.