Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Treehouse Club - MASH MASH - HTML MASH Introduction with HTML

MASH won't tell my future

I cannot get MASH to display a future. Even when I use the standard Treehouse template in the preview, enter inputs, and hit submit, no future is told. After I hit submit, the screen returns to its original state and all the input boxes are reset to blank.

Ron McCranie
Ron McCranie
7,837 Points

If you could post an example (code, workspace, etc) it would be easier to help with an answer

1 Answer

tr4, The MASH game isn't telling you your fortune because it's incomplete on purpose. Joy explains in the next video in the series that the code she provided is just 1/3 of the code you'll ultimately need. As we've learned in all the videos leading up to the MASH video series, every web page needs HTML, CSS, and Java, not just HTML. I assume you're referring to just her code she included in the teacher's notes, like below?

<!DOCTYPE html>
<html>  
<head>
  <meta charset="utf-8">

  <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=0.5, minimal-ui">

  <title>MASH</title>
  <link href="" rel="stylesheet">
  <link href="" rel="stylesheet">
</head>
<body>

  <h1 class="logo"><img src="img/mash-logo.svg" /></h1>
  <p class="description">Fill in the blanks and your future will be foretold.</p>

<form action="" method="post" id="mash">

<div id="answers" class="hide">
  <p>Your home is in <span id="location"></span> with a <span id="pet"></span> as you are a <span id="profession"></span> who owns a <span id="home"></span>.
 </div>
<div class="bucket">

 <div class="choice-bucket">
   <h4 class="highlight">Where will you live?</h4>
    <input name="location[]">
    <input name="location[]">
    <input name="location[]">
    <input name="location[]">
  </div>

  <div class="choice-bucket">
    <h4 class="highlight">Your future profession?</h4>
      <input name="profession[]">
      <input name="profession[]">
      <input name="profession[]">
      <input name="profession[]">
  </div>

 <div class="choice-bucket">
    <h4 class="highlight">What's your future pet?</h4>
      <input name="pet[]">
      <input name="pet[]">
      <input name="pet[]">
      <input name="pet[]">
  </div>

</div>

 <input type="submit" value="Tell my fortune">
</form>  
<script src=""></script>
</body>
</html>