definition:
|
selectionInitial :: HtmlRef -> [(String,String)] -> Int -> HtmlExp
selectionInitial cref sellist sel
| cref =:= HtmlRef ref -- instantiate cref argument
= HtmlInput cref (HtmlStruct "select" [("name",ref)] (selOption sellist sel))
where
ref free
selOption [] _ = []
selOption ((n,v):nvs) i =
HtmlStruct "option"
([("value",v)] ++ if i==0 then [("selected","selected")] else [])
[htxt n] : selOption nvs (i-1)
|
demand:
|
argument 1
|
deterministic:
|
possibly non-deterministic operation
|
documentation:
|
--- A selection button with a reference, a list of name/value pairs,
--- and a preselected item in this list.
--- The names are shown in the selection and the value is returned
--- for the selected name.
--- @param ref - a CGI reference
--- @param nvs - list of name/value pairs
--- @param sel - the index of the initially selected item in the list nvs
--- @return an HTML expression representing the selection button
|
failfree:
|
<FAILING>
|
indeterministic:
|
referentially transparent operation
|
infix:
|
no fixity defined
|
iotype:
|
{(_,_,_) |-> {HtmlInput}}
|
name:
|
selectionInitial
|
precedence:
|
no precedence defined
|
result-values:
|
{HtmlInput}
|
signature:
|
HtmlRef -> [(String, String)] -> Prelude.Int -> HtmlExp
|
solution-complete:
|
operation might suspend on free variables
|
terminating:
|
possibly non-terminating
|
totally-defined:
|
possibly non-reducible on same data term
|