NetTalk Central

Author Topic: yes/no confirmation???  (Read 2891 times)

osquiabro

  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • Email
yes/no confirmation???
« on: March 27, 2013, 04:06:44 AM »
is possible to implement yes/no confirmation with nettalk??

i have a form and i need when user change a value the system alert before change the value..

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11158
    • View Profile
Re: yes/no confirmation???
« Reply #1 on: March 27, 2013, 06:29:02 AM »
not easily.

It would either need to be implemented as JavaScript or with a very complicated client/server interaction.

You could send back a popup message easily enough when they change the value;
p_web.Popup('Be afraid. Be very Afraid.')
but getting a yes/no confirmation and then rolling back on No etc - that gets very tricky without writing custom JavaScript.

cheers
Bruce

osquiabro

  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • Email
Re: yes/no confirmation???
« Reply #2 on: March 27, 2013, 08:17:25 AM »
how i can call a popup form or any procedure via code?

my idea is call a form like lookup form and save the values in session variable and with a value then execute a routine

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11158
    • View Profile
Re: yes/no confirmation???
« Reply #3 on: March 27, 2013, 10:01:27 PM »
Hi Osa,

>> how i can call a popup form or any procedure via code?

it doesn't work like that. Popups can only be called from specific places - Buttons on browses and Forms, and menu items.
but if you are on a form, then you can add a button, which calls another form as a popup.

cheers
Bruce


charl99

  • Full Member
  • ***
  • Posts: 185
    • View Profile
    • Email
Re: yes/no confirmation???
« Reply #4 on: March 28, 2013, 04:41:57 PM »
Osa,

I reckon you can do it slightly differently, very briefly more or less...

- Add a local CheckBox:  Please Confirm, default NO.
- p_web.ssv('Confirm',0) when you initialise the form, and remember values that are important for the check
- In the Unhide for the Checkbox p_web.gsv('Confirm') = 1 (Or Hide the other way around I can't remember without checking)
- When the user change a value, make sure to set the 'Confirm' Session Value and add the Checkbox to your list of Reset fields
- Obviously when a value then change the checkbox will appear as some sort of Yes/No Question

When user press Save, check that the CheckBox is YES/ON when p_web.gsv('Confirm') = 1

Cheers
Charl

osquiabro

  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • Email
Re: yes/no confirmation???
« Reply #5 on: March 29, 2013, 06:02:48 AM »
great idea, and implemented..

Thanks..