AnsweredAssumed Answered

How to place a link into FreeMarker that executes an action?

Question asked by asianirish on Oct 23, 2008
Latest reply on Jan 7, 2009 by witho
As I found out standard links executing actions (like menu items and icons under nodes) are built at the server side and contains a code like this:
<a href="#" 
onclick="document.forms['browse']['browse:act'].value='browse:delete_docid_7231';
document.forms['browse']['ref'].value='workspace://SpacesStore/5279c0c2-28d6-4ea6-9d99-44ed7b63d299';
document.forms['browse']['id'].value='5279c0c2-28d6-4ea6-9d99-44ed7b63d299';
document.forms['browse'].submit();
return false;" 


(actually it fills out hidden form elements and than sumbits the form)
I cannot put this link into .ftl directly because I cannot foresee which postfix I should use after action id (like a value 'browse:delete_docid_7231' above mentioned)
Is it possible to generate a link like this by FreeMarker or JavaScript functions?

Or mayby any other ways to execute actions by user command for instance making buttons etc?

Outcomes