NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on February 21, 2020, 08:28:31 AM

Title: Parameters on OnClick a Button
Post by: Alberto on February 21, 2020, 08:28:31 AM
What is this Parameters field suppouse to do?
I need to send a parameter to the form, add 70 to the field but nothing happens.
Please see pic.
Title: Re: Parameters on OnClick a Button
Post by: urayoan on February 21, 2020, 08:44:08 AM
Hi Alberto:
  I was working in something related to that field today and this is how i use it (Bruce can told us more secrets about it :D)

  In my case, the button calls a procedure and the parameter in that places is

  'ID=' & TAB:ItemNumber

  Where TAB:ItemNumber is one field populated in the same browse.

  In the called procedure, then get the parameter with this

  p_web.GetValue('ID')

Try it, works like magic
Title: Re: Parameters on OnClick a Button
Post by: Alberto on February 21, 2020, 12:05:52 PM
Thanks but Im trying with:

'TIPO=' & 40
'TIPO=40'

I can see p_web._jsok('TIPO=' & 40), in the code

but  p_web.getvalue('TIPO')  is blanked.
Title: Re: Parameters on OnClick a Button
Post by: Bruce on February 21, 2020, 10:16:59 PM
Parameters take the form of
'somename=value&othername=value&...'

they are received by the URL procedure, when the link is clicked. (ie only the actual request). Remember a browse of form is an Event Handler, not a "procedure" so the parameter only exists for the life of the _event_.
If you want to use a parameter for more events then store it in the session queue;

p_web.StoreValue('someName')

Then you can use it as a SessionValue in your procedure.

cheers
Bruce