Let it be a bit more valid as HTML 4.01 Transitional.
Among other things, add HEAD tag, give charset information, add TITLE tag and let it start with the "<!DOCTYPE ...>" declaration.
This commit is contained in:
parent
dbd13f24ab
commit
d5b14d4ffc
|
@ -63,43 +63,48 @@ test"))
|
|||
(set! global (+ 1 global))
|
||||
(let* ((req (send-html/suspend
|
||||
(lambda (new-url)
|
||||
`(html
|
||||
`((plain-html "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">")
|
||||
(html
|
||||
(head
|
||||
(meta (@ (http-equiv "Content-Type")
|
||||
(content "text/html; charset=ISO-8859-15")))
|
||||
(title "Test"))
|
||||
(body
|
||||
(h1 "This is from SUrflet")
|
||||
(p "called " ,global " times")
|
||||
(p "Choose an annotated address:" (br)
|
||||
(ul
|
||||
(li (url ,(addr new-url "Zoe") "ab=ba"))
|
||||
(li (url ,(addr new-url "be<ta") "be<ta"))
|
||||
(li (url ,(addr new-url) "<nothing>"))))
|
||||
(p "Or choose an annotated callback" (br)
|
||||
(ul
|
||||
(li (url ,(an-cb 13) "13"))
|
||||
(li (url ,(an-cb '(1 2 3)) "'(1 2 3)"))
|
||||
(li (url ,(an-cb "hello") "hello"))
|
||||
(li (url ,(an-cb #f) "#f"))))
|
||||
(p "Or choose an input field." (br)
|
||||
(surflet-form
|
||||
,new-url
|
||||
POST
|
||||
(table
|
||||
(tr (td "Selection:") (td ,select))
|
||||
(tr (td "Selection2:") (td ,select2))
|
||||
(tr (td "Simple text: ") (td ,text))
|
||||
(tr (td "Number: " ) (td ,number))
|
||||
(tr (td "Hidden: " ) (td ,hidden))
|
||||
(tr (td "Password: " ) (td ,password))
|
||||
(tr (td "Textarea: " ) (td ,textarea))
|
||||
(tr (td "Radio:")
|
||||
(td ,(zip radios
|
||||
(map (lambda (elem)
|
||||
(list (format #f "~%~s" elem)
|
||||
'(nbsp) '(nbsp)))
|
||||
radio-elements))))
|
||||
(tr (td "Checkbox:") (td ,checkbox)))
|
||||
,submit ,reset (br) ,image))
|
||||
(p "Choose an annotated address:")
|
||||
(ul
|
||||
(li (url ,(addr new-url "Zoe") "ab=ba"))
|
||||
(li (url ,(addr new-url "be<ta") "be<ta"))
|
||||
(li (url ,(addr new-url) "<nothing>")))
|
||||
(p "Or choose an annotated callback")
|
||||
(ul
|
||||
(li (url ,(an-cb 13) "13"))
|
||||
(li (url ,(an-cb '(1 2 3)) "'(1 2 3)"))
|
||||
(li (url ,(an-cb "hello") "hello"))
|
||||
(li (url ,(an-cb #f) "#f")))
|
||||
(p "Or choose an input field.")
|
||||
(surflet-form
|
||||
,new-url
|
||||
POST
|
||||
(table
|
||||
(tr (td "Selection:") (td ,select))
|
||||
(tr (td "Selection2:") (td ,select2))
|
||||
(tr (td "Simple text: ") (td ,text))
|
||||
(tr (td "Number: " ) (td ,number))
|
||||
(tr (td "Hidden: " ) (td ,hidden))
|
||||
(tr (td "Password: " ) (td ,password))
|
||||
(tr (td "Textarea: " ) (td ,textarea))
|
||||
(tr (td "Radio:")
|
||||
(td ,(zip radios
|
||||
(map (lambda (elem)
|
||||
(list (format #f "~%~s" elem)
|
||||
'(nbsp) '(nbsp)))
|
||||
radio-elements))))
|
||||
(tr (td "Checkbox:") (td ,checkbox)))
|
||||
,submit ,reset (br) ,image)
|
||||
(hr)
|
||||
(p (url "/" "Return to main menu.")))))))
|
||||
(p (url "/" "Return to main menu."))))))))
|
||||
(bindings (get-bindings req))
|
||||
(selected (input-field-value select bindings))
|
||||
(selected2 (input-field-value select2 bindings))
|
||||
|
|
Loading…
Reference in New Issue