First of all, just a test of the browser history manager.
A simple implementation. I don't get far to abstract the page transitions and state handlings.
I tried to abstract them as possible as I can. Please see the following.
function q0() {return {x: $F("said")}};
show(INPUT({type:"text",id:"said"}),BUTTON({id:"button"},"submit"));
$("button").onclick = cont(q0,function(query) {
var said = query["x"];
show(A({id: "a", href:"javascript:void(0)"},"click here"));
$("a").onclick = cont(null,function(query) {
show(SPAN("you said " + said))})});
If Javascript had the continuation, I could write more better one.
No comments:
Post a Comment