Correct self links & restructure a bit.
This commit is contained in:
parent
9a6b262637
commit
862dd31c88
|
@ -1,9 +1,6 @@
|
|||
(define-structure surflet surflet-interface
|
||||
(open surflets
|
||||
surflet-requests
|
||||
url
|
||||
handle-fatal-error
|
||||
let-opt
|
||||
scheme-with-scsh)
|
||||
(begin
|
||||
|
||||
|
@ -23,13 +20,12 @@
|
|||
,(make-submit-button)))
|
||||
(hr)
|
||||
(p (URL "/" "Return to main menu.") (br)
|
||||
(URL "add2.scm" "Start new calculation."))))))))
|
||||
(if result
|
||||
(or (input-field-value number-input-field
|
||||
(form-query (http-url-search
|
||||
(surflet-request-url result))))
|
||||
(get-number title "Please enter a valid number."))
|
||||
(get-number title "Please enter a number."))))
|
||||
(URL "add-surflet.scm" "Start new calculation.")))))))
|
||||
(bindings (get-bindings result))
|
||||
(number (input-field-value number-input-field bindings)))
|
||||
(if number
|
||||
number
|
||||
(get-number title "Please enter a valid number."))))
|
||||
|
||||
(define (get-number1)
|
||||
(get-number "Calculation - Step one" "First number:"))
|
||||
|
@ -38,18 +34,16 @@
|
|||
(get-number "Calculation - Step two" "Second number:"))
|
||||
|
||||
(define (main req)
|
||||
(let ((number1 (get-number1))
|
||||
(number2 (get-number2)))
|
||||
(send-html
|
||||
`(html (title "Result")
|
||||
(body (h2 "Result")
|
||||
(p ,(number->string (+ number1 number2)))
|
||||
(p ,(number->string (+ (get-number1) (get-number2)))
|
||||
(hr)
|
||||
(p (URL "add-surflet.scm" "Make new calculation.") (br)
|
||||
(URL "javascript:history.go(-2)" "New calculation (same session)")
|
||||
(br)
|
||||
(URL "/" "Return to main menu.")))))
|
||||
(URL "/" "Return to main menu."))))))
|
||||
|
||||
"this string will never be evaluated"))
|
||||
"this string will never be evaluated")
|
||||
))
|
||||
|
Loading…
Reference in New Issue