Code module question

Post Reply
Mr. Bigglesworth
Posts: 56
Joined: Fri Feb 16, 2001 6:54 pm

Code module question

Post by Mr. Bigglesworth »

I've got a code module defined like this:
(file name below is e:\webs\public\objects\server_options)

<script language=vortex>
<a name=server_options_module PUBLIC>
<$myVar = "hello">
</a>
</script>


I compile the code module like so:

e:\webs\cgi-bin\texis.exe -ci -module server_options -force e:\webs\public\objects\server_options

e:\webs\cgi-bin\texis.exe -module server_options -lock


...and I have a script which uses the code module like this:

<script language=vortex>
<USES server_options>


<a name=main>
myVar = $myVar
</a>
</script>


When I run the script however, it looks like:

myVar =


In other words, no "hello" after the equals sign. This happens with every variable I try to define in my server_options page. Am I doing something wrong when compiling the code module?
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

Code module question

Post by Kai »

You're not calling any function in the module, so it doesn't set $myVar. You must call module functions like any other: either directly with a <server_options> call in the script, or (if public) as the start function in the URL; just as if it were in the primary script.
Mr. Bigglesworth
Posts: 56
Joined: Fri Feb 16, 2001 6:54 pm

Code module question

Post by Mr. Bigglesworth »

Makes good sense-- thanks!
Post Reply