Mercurial > urweb
annotate tests/activeFocus.ur @ 2074:e48e09a1f583
HTML5 input attributes: placeholder, required, autofocus; email input type (without cformTag equivalent)
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Sun, 12 Oct 2014 10:03:36 +0000 |
parents | 56b8efff64e7 |
children |
rev | line source |
---|---|
adam@1790 | 1 fun main () : transaction page = |
adam@1790 | 2 i <- fresh; |
adam@1790 | 3 return <xml><body> |
adam@1790 | 4 <ctextbox/> |
adam@1790 | 5 <ctextbox id={i}/> |
adam@1790 | 6 <active code={giveFocus i; return <xml>Done</xml>}/> |
adam@1790 | 7 </body></xml> |
adam@1790 | 8 |
adam@1790 | 9 fun dynamic () : transaction page = |
adam@1790 | 10 x <- source <xml/>; |
adam@1790 | 11 return <xml><body> |
adam@1790 | 12 <dyn signal={signal x}/> |
adam@1790 | 13 <button onclick={fn _ => i <- fresh; set x <xml> |
adam@1790 | 14 <ctextbox/> |
adam@1790 | 15 <ctextbox id={i}/> |
adam@1790 | 16 <active code={giveFocus i; return <xml>Done</xml>}/> |
adam@1790 | 17 </xml>}/> |
adam@1790 | 18 </body></xml> |