Would welcome some help and/or checking of this before I post as an issue. 
Try clicking on `One` and you should find yourself taken to "Two"

Simon

```
module Test exposing (..)

import Html exposing (..)
import Html.App as App
import Html.Attributes exposing (..)
import Html.Events exposing (..)

import List exposing (map)
import Json.Decode as Json

type alias Model =
    Maybe String

init = Nothing

type Msg
    = Switch String

update (Switch s) model =
    Debug.log"" <| Just s

view model =
    let
        kvs =
            [ ("1", "One")
            , ("2", "Two")
            ]
        makeOpts lst selectedKey =
            lst
            |> map (\(k, v) ->
                option
                    [ value k
                    , selected <| k == selectedKey
                    ] [ text v ])
    in
    select
        [ onInput Switch ] <|
        case model of
            Just s ->
                makeOpts kvs s
            Nothing ->
                makeOpts
                    (("0", "Zero") :: kvs)
                    "0"

main = App.beginnerProgram
    { model = init
    , view = view
    , update = update
    }
```

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to