NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Poul Jensen on August 02, 2013, 04:16:03 AM

Title: MessageBox functionality
Post by: Poul Jensen on August 02, 2013, 04:16:03 AM
Hi,

I have become so used to using Message to showing messages after saving a form, clicking on buttons etc. and then action on users choice.

How can I best get this functionality in a NT app ?

Cheers,
/Poul
 
Title: Re: MessageBox functionality
Post by: Bruce on August 02, 2013, 07:49:03 AM
Hi Poul,

showing a message, which basically just gives the user information and lets them select ok is fairly straight-forward.

Getting them to make a decision, and then changing behavior based on that decision is a lot more complicated because, there would then be multiple threads involved. Remember each thing the user does is a new thread, so the "save" would be one thread, and the message would be a whole other thread.

So perhaps, be more specific. In what circumstances do you want the user to do what. for example a "other" button on a form is very different to a "save" button on a form, and so on.

cheers
Bruce
Title: Re: MessageBox functionality
Post by: Poul Jensen on August 02, 2013, 08:04:46 AM
Hi Bruce,

The most important one is the Save button.
I would like to give the user a message and the option of cancelling the save.

Cheers,
/Poul
Title: Re: MessageBox functionality
Post by: Bruce on August 03, 2013, 09:23:36 PM
That would have to be done in the JavaScript layer (ie jquery.nt-form and jquery.mobile.nt-form).
Getting a request / response in at that point in the server would be over complicated. I'll add it to the list.

(as an aside - a program that asked me to confirm a Save when I hit Save would likely drive me insane <g> - it's not conducive to speedy data entry <g>)

Cheers
Bruce
Title: Re: MessageBox functionality
Post by: Poul Jensen on August 03, 2013, 10:22:38 PM
Hi Bruce,

Thanks.
And I absolutely agree with your comment.  This request is not for an normal save-buttun.  This is a function that prevents further modification to the record, so it would be good to give the user an option to bale out.

Cheers,
/Poul
Title: Re: MessageBox functionality
Post by: kevin plummer on August 04, 2013, 08:25:00 PM
Hi Poul,

One thing I do is to add a radio button with yes/no to my form (with blank default) and check in save validation a choice has been made.
Title: Re: MessageBox functionality
Post by: Poul Jensen on August 04, 2013, 11:04:58 PM
Hi Kevin,

Thanks.  That would be a nice option.

/Poul
Title: Re: MessageBox functionality
Post by: Bruce on August 04, 2013, 11:19:16 PM
yes, that's the best solution Poul. Just add a field to your form, which defaults to off, but which validation says "has to be on" for the record to save. so the user has to click on "I know what I'm doing" before clicking on Save.