setHtml can call an HTML page?

24 views
Skip to first unread message

Sorikatty

unread,
Nov 16, 2012, 11:39:14 AM11/16/12
to lif...@googlegroups.com
Hi,
Is it possible for setHtml calls one html page? if yes, whit is the syntaxe?

Thanks,

Soraya

Reuben Doetsch

unread,
Nov 16, 2012, 11:43:45 AM11/16/12
to lif...@googlegroups.com
SetHtml is basically a wrapper for a $("#id").html("<new html>"), so the question is that yes if you invoke a JsCmd on Load / whenever you press a button you can make the Html change the whole page. I wouldn't recommend this and would instead look at a client-side library for full rerendering of a page.

If you want to do it then do this:

def render = "*" #> OnLoad(SetHtml(myId, <div>NewContent</div>))

If you want to call it via a button just use SHtml.a or Shtml.button with a SetHtml command on callback 
Reply all
Reply to author
Forward
0 new messages