NetTalk Central

Author Topic: Passing parameter from non-web to web procedure  (Read 2386 times)

oggy

  • Full Member
  • ***
  • Posts: 219
    • View Profile
    • Email
Passing parameter from non-web to web procedure
« 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: Passing parameter from non-web to web procedure
« Reply #1 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

oggy

  • Full Member
  • ***
  • Posts: 219
    • View Profile
    • Email
Re: Passing parameter from non-web to web procedure
« Reply #2 on: March 07, 2012, 11:44:33 PM »
My idea is to pass server time from websserver procedure to PageHeaderTag

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: Passing parameter from non-web to web procedure
« Reply #3 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

oggy

  • Full Member
  • ***
  • Posts: 219
    • View Profile
    • Email
Re: Passing parameter from non-web to web procedure
« Reply #4 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..

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: Passing parameter from non-web to web procedure
« Reply #5 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