Hi Bear, Eric, Bauke,
Thanks for your thoughts so promptly!
I am actually trying to get the path of the directory within which the file exists. The called script then cycles through all the files in that directory and processes them. Specifically, the script resizes (downsizes) all the jpg images in the directory. And yes, it so happens that I am running both the server and the client on the same PC.
FYI my environment is:
. Dell Core 2 Duo PC
. Windows XP Pro SP3
. PHP version 5.2.6
. IIS version 5.1
. MySQL version 5.0.51b-community-nt
. Dreamweaver MX2004 version 7 as the "text editor"
. Internet Explorer version 6.0.2900
. sendmail.exe
. Adobe AIR runtime version 1.5.0.7220
. Aptana Studio version 1.0.0.0
All running on the Dell PC - i.e., all executions are via 'localhost'
When I was developing this application, I was advised that the above technique was the only way to select a directory (on the client) in HTML/PHP without hard-coding it.
I have recently installed Adobe AIR to see if I can figure out how to do this without needing server functionality on my PC. But I've only just started to use AIR so am very much a babe in the woods with that technology so far. (I'm also only a beginner with JavaScript too). But I do see that you can select a directory (on the client) with JavaScript within AIR but I haven't gone further than that yet. There can be hundreds of jpg images in directory that I am trying to process, so downsizing them one-by-one is impractical.
While I'm at it, does anyone know how to resize images using JS/AIR? The PHP code to do this is quite neat and I found it via Googling on the 'net.
Again, thanks for your thoughts/advice so far.
Cheers from Oz,
E.J.