Clickable HTML

Is it possible in Servoy to have a HTML area on a form with clickable links or buttons that fire a method in Servoy, like you can do with a ‘real’ HTML page? For example, I’d like to implement a calendar built in HTML and have a user be able to click on an event and fire a method like ‘showEventDetail()’. Is this possible?

Hi Phil,

Yes you can. Just create HTML with hrefs with the following syntax:

<a href="javascript://globals.methodname()">some link text</a>

or

<a href="javascript://forms.formName.methodname()">some link text</a>

or when shown ON the form with the method

<a href="javascript://methodname()">some link text</a>

Just make sure you place the HTML in a HTML_AREA that has editing disabled.

Hope this helps.

Thanks Robert,

I was about to post to say ‘sorry I found it’ in the Help (why didn’t I look there first?) but you are so quick! Your examples are better than in ther help though, thank you very much Robert.

A gotcha for anyone putting method calls in HTML, please check this post: http://forum.servoy.com/viewtopic.php?f=3&t=569&p=5250&hilit=getusers+value+list#p5250 There is some important syntax for addressing the passing of parameters in the HTML code.