NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: DonnEdwards on June 17, 2021, 12:04:36 PM

Title: Confirmation dialog ?
Post by: DonnEdwards 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?
Title: Re: Confirmation dialog ?
Post by: Bruce 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
Title: Re: Confirmation dialog ?
Post by: jari@softmade.fi on June 21, 2021, 01:29:26 AM
  p_web.Script('ntAlert("Your message here","Alert...!");')


Jari
Title: Re: Confirmation dialog ?
Post by: DonnEdwards 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.