# Build links |
Instead of _href you can pass the URL using the callback argument where the effect of pressing the link will be an ajax call to "myaction" instead of a redirection.
{{=A('click me', callback=URL('myaction'))}}
Instead of redirection, optionally using target argument the response of the ajax callback will be stored in the DIV with id equal to "t".
{{=A('click me', callback=URL('myaction'), target="t")}}
#Result
<div id="t"><div>
Upon response, the closest tag matching "div#b" will be deleted. In below case, the button will be deleted
<div id="b">{{=A('click me', callback=URL('myaction'), delete='div#b")}}</div>
# Typical application is:
# Pressing the button will perform the callback and delete the table row.
{{=A('click me', callback=URL('myaction'), delete='tr")}}
Special argument. By clicking on the link with cid argument causes the content to be loaded in the div. This is similar but more powerful than the previous syntax since it is designed to refresh page components.
{{=A('linked page', _href='http://example.com', cid='myid')}}
<div id="myid"></div>