NetTalk Central

Author Topic: Alert with Confirm  (Read 5065 times)

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Alert with Confirm
« 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Alert with Confirm
« Reply #1 on: May 16, 2010, 10:37:52 PM »
Throw up the warning _when_?
After they click on a SAVE button maybe?

cheers
Bruce

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Alert with Confirm
« Reply #2 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...

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: Alert with Confirm
« Reply #3 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Alert with Confirm
« Reply #4 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

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: Alert with Confirm
« Reply #5 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Alert with Confirm
« Reply #6 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

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Alert with Confirm
« Reply #7 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).
Cheers,

Stu Andrews

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Alert with Confirm
« Reply #8 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