#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    1
    Rep Power
    0

    Call And Response "Game"


    Ok so I have an idea I want to do just for Grins and Giggles with my buds. I want to Make a sort of call and response "game" if you will. Basicly You type something in and it will respond with something either pre-determined or the best match for what they typed. My problem is I can't figure out how to Make the Interface, I wanted to use
    Code:
    console.log
    but i cant figure out how to make it show on the page.

    Another problem is the input, I can't figure out how to have it take the input and look through the code for the right response

    thanks
  2. #2
  3. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,183
    Rep Power
    184
    Originally Posted by cmorg789
    but i cant figure out how to make it show on the page.
    You need to look into JavaScript DOM, such as:

    element.innerHTML
    document.createTextNode

    Originally Posted by cmorg789
    Another problem is the input, I can't figure out how to have it take the input and look through the code for the right response
    Look into JavaScript Conditional Validation; such as:

    if/else conditions
    ternary operators
    switch statements
    while conditions
    do... while conditions

    And... here is a List of JavaScript Statements; just encase your interested in checking it out.

    Comments on this post

    • Winters agrees

IMN logo majestic logo threadwatch logo seochat tools logo