NetTalk Central

Author Topic: Passing Parameters  (Read 14516 times)

John Hickey

  • Administrator
  • Newbie
  • *****
  • Posts: 47
    • View Profile
    • Email
Passing Parameters
« on: June 17, 2007, 02:38:04 PM »
From the newsgroups, Rudi Havenga asked:

On the NetWebForm you can call the URL On Save with parameters eg.

'SECONDFORM?bFile=Mailboxes&bKey=Key&IDField=MAI__MailboxNumber&Change_btn=Change&'

(I got this from example 24)

The only thing is that I can not find the place in SECONDFORM where these
parameters are received and interprated. How do I do that?

The second thing I would like to know is whether it is possible to put
variables in these parameters instead of hard coded values.

Chris C answered:

Passing parameters in NetTalk (and on the web in general) is more like using global variables between procedures than actually passing prototyped paramters.
Just by passing them in the request, places the variables in the request buffer. And can be gotten with p_web.getValue('bFile')
Also the values may also be stored more globally as Session Variables -p_web.GetSessionValue('IDField')
So even though you don't see them being stored in the source, doesn't necessarily mean that they aren't being stored. The WebHandler does this part.

And Bruce Johnson answered:

If another site is calling you with parameters, then you can access those parameters using the following methods.

value = p_web.GetValue('name')
and
x = p_web.IfExistsValue('name')

if you want to manipulate the parameters then use

p_web.SetValue('name',value)

In terms of passing parameters to another web site - yes you can use variables...

for example
'SECONDFORM?bFile=Mailboxes&bKey=Key&IDField='&p_web.GetSessionValue('whatever')&
'&Change_btn=Change&'

(all on one line)