2014-08-12 21:18 GMT+02:00 Wojciech Narczyński <wojtek@power.com.pl>:
W dniu 2014-08-12 01:22, Alberto G. Corona pisze:
But formlets are implemented in the server side. and you probably think in applications with heavy use of JavaScript for validations, interaction etc. In this case, there is a formlet implementation in the client side, which is my.. Ahem!... package hplaygroud:Very interesting, please allow a few questions about your approach:
https://github.com/agocorona/hplayground
1. Would it be possible to save a snapshot of a paritally filled form on the server?hplayground is client side. but by means of Haste.Ajax it is possible to send something to a server.dor <- (+) <$> inputAndSend<*> inputAndSendp (show r) ++> noWidgetwhereinputAndSend= dor <- inputInt Nothing `wake` OnKeyPress <++ brsendInt rreturn rsendInt i= send the int trough Haste.Ajax
2. Would it be possible to display the sum before the values: 3 = [ 1] + [ 2] <-- this is rendered HTML, not Haskell?
yes, using "at":dowraw $ div ! id "result" $ noHtmlr <- (+) <$> inputInt Nothing `wake` OnKeyPress <++ br<*> inputInt Nothing `wake` OnKeyPress <++ brat "result" Html $ p (show r) ++> noWidget(I thought I would have more questions, but somehow I can't think of any right now...)
--
Kind regards,
Wojtek
--
Alberto.