Another problem with functions other than 'main'

Post Reply
User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Another problem with functions other than 'main'

Post by Thunderstone »



Hi,
when calling a function in a Texis Web script other than 'main' from a
<FORM>, in the URL locator of the browser I can see that parameters were
successfully passed on (i.e.
../function_name.html?parameter_name=parameter_value...) but instead of
the HTML page generated by the new function I see the same HTML page
generated by the 'main' function, so it seems than the other function never
was called!

Why this strange behaviour?

Thanks

Antonio




User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Another problem with functions other than 'main'

Post by Thunderstone »




Most (but not all) of the time, Vortex makes functions PRIVATE if they
are not otherwise declared, which means they cannot be called from outside
the script (eg. by a form). This is a security feature. To make the
function callable from the form, add the PUBLIC attribute after the NAME:

<A NAME=myfunc PUBLIC param1 param2>

See http://www.thunderstone.com/vortexman/node22.html for details.

-Kai


Post Reply