My topic got messed up when posting.
It should read "how to get img src=[path to ApplicationData-directory] to work"
I am developing a desktop app that will be updated by communicating with a server, downloading an XML-file of updated files (images, js and css) and then download the updated files to the application data directory ( retrieved from Titanium.Filesystem.getApplicationDataDirectory() ).
Now, my problem is that when i f.x. want to display the images, I can't seem to use the value thet I get from the getApplicationDataDirectory-function to set the path to the image. I had an idea of having a php-file in the application-directory (not data-directory) with
and then doing
But since i can't access the Titanium API when prerendering the PHP and i can't pass the value of a JS-variable to the PHP-file, I feel as if I have hit a wall.
I am thinking of changing the src-values using JS on every image, but this doesn't seem efficient especially since I have a lot of images and also css and js-files that need to be fetched from the application data directory.
I am probably missing something very simple here so if anyone have a solution or a suggestion to push me in the right direction, please feel free to speak up :)