rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: Warp on December 26, 2008, 04:06:01 PM

Title: macros - filesize
Post by: Warp on December 26, 2008, 04:06:01 PM
Hi,
another macro related question.

I wrote a text file (Test.txt).
Using a javascript interval i write the filesize to another frame every second:

parent.frames[1].document.write ('{.filesize|warp2001\test.txt.}');

So far it works.

If a manualy edit and save the text file the size changes.

But the javascript function with the macro always write the old filesize.


Maybe i don't understand the macro concept ?
Any idea or help ?



Warp
Title: Re: macros - filesize
Post by: rejetto on December 27, 2008, 12:19:27 AM
macros run server side, once.

when your javascript code is downloaded, the macro is ran once, the result is passed to the browser as a number.
that's why.
you can't use macros for that purpose (client side).
Title: Re: macros - filesize
Post by: Warp on December 27, 2008, 10:15:06 AM
Hi,

ok, i understand.
Thank you for the answer.


Warp