NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: kevin plummer on May 16, 2010, 04:26:42 PM

Title: Alert with Confirm
Post by: kevin plummer on May 16, 2010, 04:26:42 PM
Is there a current or planned way to add ok and cancel to an alert message?

I would like to throw up a warning but let the user choose to continue or cancel.

eg 'Selected records do not equal zero - continue?' OK or Cancel

Bruce maybe your new modular popup window?

Either way it would need to work like clawin code

 If Message('Selected items do not Equal zero.| Do you want to continue?','Reconcile',ICON:QUESTION,BUTTON:Yes+BUTTON:No,BUTTON:No) = BUTTON:Yes

Cheers,

Kevin
Title: Re: Alert with Confirm
Post by: Bruce on May 16, 2010, 10:37:52 PM
Throw up the warning _when_?
After they click on a SAVE button maybe?

cheers
Bruce
Title: Re: Alert with Confirm
Post by: kevin plummer on May 16, 2010, 11:25:49 PM
> After they click on a SAVE button maybe?

That would be handy sometimes but in this case I am just clicking a button and running some server side code and refreshing the browse. I don't suspect my code would stop and wait for an answer back from the user like in a windows app...
Title: Re: Alert with Confirm
Post by: Robert Iliuta on November 03, 2011, 07:33:40 AM
Hallo Bruce,

Is this implemented in NT5?
I hand code some button that simulate a delete action and I need to confirm the action. How can I do that?
I need a message with ok and cancel button.

Thank you!,
Robert
Title: Re: Alert with Confirm
Post by: Bruce on November 03, 2011, 10:29:14 PM
The delete button is a trick animal, partly because of this confirm message. You need to put some JavaScript on the button so that it uses the JavaScript "confirm" command.

Probably your best bet if hand-coding a button is to take a look at a genuine "in-row" delete button and see what it does.

cheers
Bruce
Title: Re: Alert with Confirm
Post by: Robert Iliuta on November 03, 2011, 11:00:30 PM
I know I could do with java script or I could do a form ... but want something more easy :-) like in clarion.
Does NT6 support this?
Robert
Title: Re: Alert with Confirm
Post by: Bruce on November 04, 2011, 05:19:52 AM
Your spec is somewhat fuzzy - so I'm noot really sure what "it" is that you're wanting me to support.

The short answer is probably "no".

cheers
Bruce
Title: Re: Alert with Confirm
Post by: Stu on November 07, 2011, 12:18:55 AM
Kevin,

You could probably use a jQuery UI dialog window (http://jqueryui.com/demos/dialog/#modal-confirmation) to achieve this, and you could probably template it (if you want it in a number of places).
Title: Re: Alert with Confirm
Post by: kevin plummer on November 07, 2011, 03:35:32 AM
Thanks Stu, interesting stuff. It could come in handy for the future. The funny thing about web development for me was it takes a while to get out of the "windows" way of doing stuff. I found a better way to do it without messages popping up.

Cheers,

Kev