[jQueryGoodies] Layout_AjaxPopUp usage

[jQueryGoodies] Layout_AjaxPopUp usage

Forge Component
Published on 2015-11-12 by Renato Pauleta
14 votes
Published on 2015-11-12 by Renato Pauleta
I am wondering if I could use this component in my application for a confirmation popup?? If so, please say me how to bind it with a 'Submit' button.
I wouldn't go there. It's possible to do it, but you require to change the behavior of your default submit button.

Basically your submit button needs to be the caller for the popup (confirmation dialog) and on the popup your confirm button will notify the page to do what the submit button originally did.
Please teach me how can I invoke the popup on click of 'Submit' button. 
1 - Create a web block where you'll have your confirmation message and your Confirmation and Cancelation buttons (both set as ajax submit).

2 - On the confirmation button logic add a Notify action and a AjaxPopupClose action, on the cancelation button just add the AjaxPopupClose.

3 - Go to your page and drag and drop the LayoutAjaxPopup next to your Submit button. Drag and drop the new confirmation web block you created on step 1 inside the layoutAjaxPopup

4 - Name your submit button and use that name on the linkId of the LayoutAjaxPopup (example: submitbuttonname.Id)

5 - Change your submit button method to navigate and change the destination to ExternalURL (in the url put "#")

6 - On the notify destination add the previous destination from the submit button (this is where you want to run the submit action, but this time coming from the notify of the confirmation button)

PS: Attached is a sample of you need. It's on version 9.1 though. If you need in a previous version let me know and I'll try to get it for you. The reason why I've included the jQueryGoodies component again is because I had to fix a small bug in the LayoutAjaxPopup CSS, so make sure you publish this version.
I followed step by step. But after all of these,

1) The web block is always showing in the screen. I didn't find any visibility control.

2) Also upon clicking on the confirm on the popup the existing 'Submit' function action is getting called. Good sign :)

3) But the popup should have opened on clicking the Submit button.

4) Also a error is coming that the 'AjaxPopupClose' is not defined.
Please help. I can't get it working.
Download service studio 9.1.x.x and open the sample file I've sent make sure you have the same on your side. Also copy the CSS and JavaScript from the layoutAjaxPopup and paste it on the one you have installed on your server. Let me know what version you're using and I'll get you the most recent version of jquery goodies for you to install. It's an holiday here today so I can only get you the code tomorrow. Good luck.