Servoy supports html rendering in html area field. We can display database stored images into the HTML and call Javascript function.
Following code will demonstrate how we can display database images in html and attach Javascript function into html.
var html = '<html>';
html += '<table border = "0" width = "82" height = "82"><tr>';
html += '<td> <a href = "javascript:your_Servoy_function' + '(' + companies_id + ')' + '" >';
html += '<img height = "80" width = "80" border = "1" src = "media:///servoy_blobloader?servername=user_data&tablename=companies&dataprovider=company_logo&rowid1=' + companies_id + '" >';
html += '</td></tr></table>';
html += '</html>';
globals.htmlArea = html;
In above code line in the 3rd line i have called a servoy function in “<a href>” as Javascript function. Function take argument primary key of table which contains images.
In the 4th line “src ” values are “media:///servoy_blobloader?” prefix for media type content, servername parameter is your servoy server connection, table name from which table you want to load data into HTML area,dataprovider is field which contains the medias and rowid1 is primary key of the selected record.