Another question, my code now looks like this:
if (record.fields.ExternesSystemBezeichnung == "Paradis pour gourmets") {
showLogoImage("images/img/logos/PA/PD_FR_Paradis_pour_gourmets_500.png",4,4)
}
if (record.fields.ExternesSystemBezeichnung == "Paradijs voor fijnproevers") {
showLogoImage("images/img/logos/PA/PD_NL_Paradijs_voor_fijnproevers_500.png",4,4)
}
if (record.fields.ExternesSystemBezeichnung == "Welt der VerfĂŒhrung") {
showLogoImage("images/img/logos/PA/PD_DE_Welt_der_Verfuehrung_500.png",4,4)
}
else {
results.show();
}
/* showLogoImage
Parameter:
imgsrc = Pfad zum Bild in den Bildresourcen
teilerX = Divisor zum Verkleinern der Bildbreite auf gewĂŒnschtes Format
teilerX = Divisor zum Verkleinern der Bildhöhe auf gewĂŒnschtes Format
*/
function showLogoImage(imgsrc, teilerX, teilerY) {
results.attr("src", imgsrc);
dimensions = resource(imgsrc);
width = (dimensions.width / teilerX) + "pt";
height = (dimensions.height / teilerY) + "pt";
results.css("width", width);
results.css("height", height);
results.show();
}
Since I need the function to show/change the images in other conditional scripts I would like to make it global.
I created a Javascript file called âfunctionsâ in the Resource tree under âJavaScriptsâ, did cut the function from the consition code and pasted it into the functions file in the resource tree. But in the condition Javascript the function now is shown as âunknownâ.
Is the resource tree not the right place to do this? If not, how can I make functions like this global?
Thanks again.