rejetto forum
Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: r][m on September 25, 2008, 07:21:39 AM
-
Anyone have an example of how to make a macro run
only when a link or button is clicked ?
To execute a macro like {.exec|C:\Hfs_Test\analog\analog.exe.}
-
the template is basically a script that outputs the HTML whenever a page is requested.
so if you only want to run a certain macro when you click a button you could either create a new template section [section] that has the macro and then call it when you need to /~section.
or you could use another macro in conjunction with the one you want to test for a certain post/get variable that will execute the macro when found.
-
possible way
<form><input type='submit' name='action' value='run'></form>
{.if|{.?action = run.}|{:
{.exec|whatyouwant.}
:}.}
macros are server side. to get the execution without refreshing the page, you must use ajax/ahah calls.
-
I only had time to check it once from work tonight, but it
worked great ! :) Now I can run my log analyzer program
from another location and see the latest traffic anytime,
Just by clicking the button on a page.
This is awesome. Many thanks Rejetto.