I have a couple of methods that stack up images in table cells and display in an html area. One method displays images derived from the user database as shown in this snippet:
globals.html_photo ='<html><body><table border ="0" align = "center" cellpadding ="0"><tr>';
photo_html_txt = '<td style = "width: 1px" valign = "top">';
for ( var i = 0 ; i < foundset.getSize() ; i++ )
{
var record = foundset.getRecord(i+1);
//Determine image height and width
var image = plugins.images.getImage(record.photo);
var height = image.getHeight();
var width = image.getWidth();
var ratio = height/width;
//Set image height according to scale and real-world length of image
var imgheight = Math.round(height/scale);
var imgwidth = Math.round(imgheight/ratio);
var text = '<img src= "media:///servoy_blobloader?servername=' +
controller.getServerName() + '&tablename=' + controller.getTableName() +
'&dataprovider=photo&rowid1= ' + record.corephoto_id + '" height ="' + imgheight + '" width = "'+ imgwidth + '">';
photo_html_txt += text;
columnPixeLength += imgheight;
columnRealWorldLength += record.length_real_world
}
photo_html_txt += '</td>'
axiscolumn();
globals.html_photo += axis_html_txt + photo_html_txt +'</tr></body></html>'
The method axiscolumn, operates essentially identically - except that the images it displays comes from Servoy’s image repository:
axis_html_txt = '<td style = "width: 1px; border-style: solid; border-width: 1px" valign = "top">';
var tickLengthMinor = 10;
var tickMinorSpacing = 2;
//Get pixel spacing between minor ticks in pixels
var tickSpacingMinor = columnPixeLength/Math.floor(columnRealWorldLength/tickMinorSpacing);
var integerSpacing = Math.floor(tickSpacingMinor);
var remainder = tickSpacingMinor - integerSpacing;
var spacingIncreaseIncrement = 1/remainder;
var counter = 0;
while (counter < columnPixeLength)
{
axis_html_txt += '<img src= "media:///blkHorizLine.jpg" height ="1" width = "'+ tickLengthMinor + '">';
axis_html_txt += '<img src= "media:///whitespace.jpg" height ="'+ integerSpacing + '" width = "'+ tickLengthMinor + '">';
counter += integerSpacing+1;
}
axis_html_txt += '</td>';
The final result of these two methods is to display a 2 column table with the stacked images side-by-side in an html area. All works as expected in smart client, but in the web client, the column with the dataprovider-stored images does not display, whereas the column with the Servoy repository images DOES display correctly.
Am I doing something wrong or is this a known bug/feature?