Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sweet Alert to Submit a Page

Dj SteeleMar 5 2018

Good Afternoon,

Using APEX 5.1.0.00.45 Oracle 12c DB and Google Chrome.

If this should be in another Forum please inform, I only ask because it involves "Sweet Alert"

Problem Trying to Solve:

To get a Page to Submit after a Confirm Button with a Sweet Alert:

Currently I have 2 Buttons

1.) "Refund Now" that has the "Behavior" Action: "Submit Page" & Database Action: "SQL INSERT Action" (This Does Work & Submits Page)

2.) "Refun" that has the "Behavior" Action: "Redirect to URL" Target "javascript:getInput_confirmRefund(); Database Action: "SQL INSERT Action"

The Second Item above is what I would like to get to work; again mainly getting the Sweet Alert to "Submit Page" The "Refund" Button Below

pastedImage_0.png

After Clicking "Refund" Button I do get the Sweet Alert to Generate; This stems from the Javascript being placed in

"Function and Global Variable Declaration" Section of Main Page (Javacript Below From Sweet Alert Website): https://sweetalert.js.org/guides/#upgrading-from-1x

pastedImage_1.png

function getInput_confirmRefund() {

swal({

  title: "Are you sure you would like to issue a Refund?",

  //text: "Be sure.",

  icon: "warning",

  buttons: \["Cancel", "Confirm"\],

  dangerMode: true,       

  //type: "input",

 showCancelButton: true,

  //closeOnConfirm: false,

  //animation: "slide-from-top",

  //inputPlaceholder: "Type Something"

})

.then((willDelete) => {

  if (willDelete) {

    swal("Poof! Your imaginary file has been deleted!", {

      icon: "success",

    });

  } else {

    swal("Your imaginary file is safe!");

  }

  //$s("P10\_HIDDEN\_RCEIPTDETAIL\_DESC", inputValue);

  apex.submit('Refund');

});

}

-----------------------------------------------------------------------------------------------------------------

This is What I'd like my Sweet Alert to Look like; following suite from Sweet Alert Website:

pastedImage_5.png

pastedImage_6.png

pastedImage_7.png

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 2 2018
Added on Mar 5 2018
0 comments
863 views