NetTalk Central

Author Topic: Parameters on OnClick a Button  (Read 3919 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Parameters on OnClick a Button
« 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.
-----------
Regards
Alberto

urayoan

  • Full Member
  • ***
  • Posts: 222
    • View Profile
    • AZ Rock Radio
Re: Parameters on OnClick a Button
« Reply #1 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

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Parameters on OnClick a Button
« Reply #2 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.
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Parameters on OnClick a Button
« Reply #3 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