I've been trying to use Javascript to call a function from within the [file] tag like so:
[file]
addFile("%item-name%", "%item-url%", "%item-size%", "%item-modified%", "%item-dl-count%", "%comment%", "%new%");
inside the addFile function, I have the line
document.write('<a href="'+url+'"><img name="newimg"'+fileNum+'" src="/\~img_file" /><br>'+name+'</a><br>');
Basically, this will show the image with a link. The problem is, the page only displays a little white box which i'm assuming is the
default HFS icon. I believe the problem is that if you don't call ~img_file within the [file] tag, HFS will return the default image.
addFile() is not located within the [file] section, its in the pages <head> tag.
Does anyone have any ideas on how to get images working if called in a javascript function? Maybe a new HFS function would
help, something like: ~img_file?<url> which would make HFS retrieve the icon for the file in the URL (a file within the
filesystem). You could call it like
<img src=~img_file?%item-url%>
Any help would be appreciated.