NetTalk Central

Author Topic: Confirmation dialog ?  (Read 4426 times)

DonnEdwards

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • Insights and Rants
    • Email
Confirmation dialog ?
« on: June 17, 2021, 12:04:36 PM »
I have a browse form where the user clicks on a button to perform a specific task. I would like to be able to check whether the task is one of 2 possible conditions, and then ask the user which condition they prefer, something like the delete confirmation box.

Clearly the MESSAGE() command is not the right thing, but I haven't found any examples of a confirmation dialog that is not part of the standard form buttons. Does such a thing exist? Alternatively, how can I display an error if something goes wrong with the code called by the button?
If you're happy with your security, then so are the bad guys

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Confirmation dialog ?
« Reply #1 on: June 18, 2021, 06:04:06 AM »
>> Does such a thing exist?

not really, because that's a round-trip interaction with the customer, and of course all you have on the server side is an event handler.

So if you want to do "more UI" with the user, after they press a button, then have the button call a memory form. On that form you can display text, offer choices, and so on. Then do what you need to do from there.

In other words Browse -> Memory Form -> Work.

Which then matches the UI you want to create - Browse -> Ask more questions -> Work.

Cheers
Bruce

jari@softmade.fi

  • Full Member
  • ***
  • Posts: 134
    • View Profile
    • Email
Re: Confirmation dialog ?
« Reply #2 on: June 21, 2021, 01:29:26 AM »
  p_web.Script('ntAlert("Your message here","Alert...!");')


Jari

DonnEdwards

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • Insights and Rants
    • Email
Re: Confirmation dialog ?
« Reply #3 on: June 23, 2021, 11:46:26 AM »
  p_web.Script('ntAlert("Your message here","Alert...!");')

Thanks for the sample. I will experiment further, following Bruce's advice. I need to ask a "Yes/No" type of question, much like the Delete confirmation box. So far I have figured out another way of alerting the user to an error condition, but I'd prefer to ask the user first, rather than report a failure aftwards.
If you're happy with your security, then so are the bad guys