NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: oggy on March 07, 2012, 01:26:57 AM

Title: Passing parameter from non-web to web procedure
Post by: oggy on March 07, 2012, 01:26:57 AM
Is it possible to pass variable as some parameter from non-web procedure (webserver for example) to another, web, procedure?
NT 5.37...
Regards, Ozren
Title: Re: Passing parameter from non-web to web procedure
Post by: Bruce on March 07, 2012, 09:51:18 PM
Can you give me more idea of the context please? What exactly are you trying to do?

cheers
Bruce
Title: Re: Passing parameter from non-web to web procedure
Post by: oggy on March 07, 2012, 11:44:33 PM
My idea is to pass server time from websserver procedure to PageHeaderTag
Title: Re: Passing parameter from non-web to web procedure
Post by: Bruce on March 10, 2012, 04:36:47 AM
Hi Ozren,

"server time" being what? the clock time on the server? But you wouldn't need to pass that - just call CLOCK() in the Header procedure.

Something else maybe? server elapsed time? Or a property of the server object?

p_web has a reference to the server object, so if you want to read a property of the object you can. eg
x = p_web.RequestData.WebServer.whateverproperty

cheers
Bruce
Title: Re: Passing parameter from non-web to web procedure
Post by: oggy on March 10, 2012, 04:52:11 AM
The reason is why in need server time (server elapsed time, whatever is semantic is), because of daily scheduled maintenance and backup of data on server. I need to inform users not to log in and logged user to get out from session... I need precise time, not users local time..
Title: Re: Passing parameter from non-web to web procedure
Post by: Bruce on March 12, 2012, 02:19:11 AM
yeah, so the p_web object can access the server object properties using,
p_web.RequestData.WebServer.whateverproperty
or indeed it can also read other, global, unthreaded variable values as well.

Cheers
Bruce