11367 (1) [Avatar] Offline
#1
I've double checked I copied the code correctly, but at the end of 2.1.2 I end up with a black empty page. That error is from the js console.
Can I search for something specific in the elm.js I just compiled to see if there's something weird or unexpected? (I'm bad at JS...)

This my code:

module PhotoGroove exposing (..)

import Html exposing (..)
import Html.Attributes exposing (..)

view model =
  div [ class "content" ]
      [ h1 [] [ text "Photo Groove" ]
      , div [ id "thumbnails" ]
        [ img [ src "http://elm-in-action.com/1.jpeg" ] []
        , img [ src "http://elm-in-action.com/2.jpeg" ] []
        , img [ src "http://elm-in-action.com/3.jpeg" ] [] ]
      ]

mail =
  view "no model yet"




<!doctype html>
<html>
<head>
  <style>
    body { background-color: rgb(44, 44, 44); color: white; }
    img { border: 1px solid white; margin: 5px; }
    .large { width: 500px; float: right; }
    .selected { margin: 0; border: 6px solid #60b5cc; }
    .content { margin: 40px auto; width: 960px; }
    #thumbnails { width: 440px; float: left }
    h1 { font-family: Verdana; color: #60b5cc; }
  </style>
</head>
<body>
  <div id="elm-area"></div>

  <script src="elm.js"></script>
  <script>
    Elm.PhotoGroove.embed(document.getElementById("elm-area"));
  </script>
</body>
</html>


p.s. cut & paste from the book is a nightmare...
376034 (11) [Avatar] Offline
#2
My suspicion is that you did not compile (`elm-make`) properly and there is no `elm.js` file in the same directory as `index.html`