view tests/html5_cforms.ur @ 2079:e1879ded8095

Textual HTML5 AJAX widgets
author Adam Chlipala <adam@chlipala.net>
date Sun, 16 Nov 2014 15:03:29 -0500
parents
children f05fcb206571
line wrap: on
line source
fun dn [a] (_ : show a) (x : source a) : xbody = <xml>
  <dyn signal={v <- signal x; return (txt v)}/>
</xml>

fun main () : transaction page =
    a <- source "";
    b <- source True;
    c <- source "a@b";
    d <- source "";
    e <- source "";
    f <- source "";

    return <xml><body>
      <ctextbox source={a}/>
      <ccheckbox source={b}/>
      <cemail source={c}/>
      <curl source={d}/>
      <ctel source={e}/>
      <csearch source={f}/>

      <hr/>
        
      {dn a};
      {dn b};
      {dn c};
      {dn d};
      {dn e};
      {dn f}
    </body></xml>