Confirmation messages and the Popup_Editor widget

Confirmation messages and the Popup_Editor widget

  

I am using a button to invoke a popup which performs a number of tasks during its preparaton phase. 

I would like to have the user confirm that they really want this to happen when they click the button which brings up the popup, but the confirmation message attached to the button is not called after it is wired up to the popup_editor widget.

The message appears fine if I simply use the button (or a link) to navagate to the desired page, but once the popup_editor is brought into the mix the popup (as well as anything manually attached to the button't onlick event) the confirmation is ignored and the popup comes up immediately.

Is there an easy way around this?  I could just make a screen action the destination and then invoke the popup from within there via code, but that seems to be is a very roundabout way to accomplish this.

Thoughts?

Chuck Doherty
 

Hello Chuck,
is it possible to post an example file?

Hi Rui,

I'll see about whipping up an example shortly; the live system in which the problem is occuring is much too involved to send along.

cd
 

Hi Chuck,

The popup editor modifies the onclick of the button/link associated, since you getting that behavior I guess it is not taking into account the confirmation ... so it gets lost in the process.

A workaround for that is to use 2 buttons.
One visible with the confirmation message, and method ajax. In the screen action use a WidgetClick action from RichWidgets to click a second button.
The second button needs a style "display:none", method navigate to the popup screen and with a popup_editor associated.

This solution will make an extra request, but shold be fast enough to be transparent to the user.

Regards,
João Rosado