Arc Forumnew | comments | leaders | submitlogin
1 point by cut-sea 6139 days ago | link | parent

Kahua Current.

   (use dsl-simple)

   ;; said
   (define-main-page (said)
     (selfish "say"
      (form/cont/ (entry-lambda (:keyword say)
   		 (a/cont/ (cut p/ "You say:" say) "click here"))
           (readln/ say)
           (submit/))))
and below code realize said x 5 parts in a page.

   (define-macro (s id)
     `(selfish ,(x->string id)
        (form/cont/ (entry-lambda (:keyword ,id)
   		   (div/ (a/cont/ (cut p/ "you say:" ,id) "click here")))
          (readln/ ,id)
          (submit/))))

   (define-main-page (said5)
     (node-set/ (s say1) (s say2) (s say3) (s say4) (s say5)))
Of course, these 5 said parts work independently. When text string are filled and click other link or post other submit, these filled text are kept automatically.

Characteristically as continuation based system, browser's back button attack and tab clone attack make no problem.