webmcp
view framework/env/ui/anchor.lua @ 214:6ac7133bb58e
Work on Moonbridge integration: added execute._initializers(...), new function request.get_param{...}; Code cleanup in mcp.lua and tempstore.save(...)
| author | jbe | 
|---|---|
| date | Sat Jan 10 10:44:17 2015 +0100 (2015-01-10) | 
| parents | ca44dff90b4e | 
| children | 
 line source
     1 --[[--
     2 ui.anchor{
     3   name    = name,    -- name of anchor
     4   attr    = attr,    -- table of HTML attributes
     5   content = content  -- string to be HTML encoded, or function to be executed
     6 }
     8 This function writes an HTML anchor into the active slot.
    10 --]]--
    12 function ui.anchor(args)
    13   local attr = table.new(args.attr)
    14   attr.name = args.name
    15   return ui.tag{
    16     tag = "a",
    17     attr = attr,
    18     content = args.content
    19   }
    20 end
