Questions tagged [sweetalert]

SweetAlert is a JavaScript library that provides a replacement for standard alert() dialogue.

SweetAlert is a JavaScript library that provides a replacement for the standard alert() dialogue that allows styling and customization. Indeed, it also may be regarded as a replacement for confirm() and prompt().


Documentation :

Similar Libraries:

1069 questions
5
votes
2 answers

Override dismiss button in R Shiny modal dialogue

I am using modal-dialogue in R Shiny to get input from the user. In this form, there is a dismiss button by default which closes the form when it is clicked. I want to add a confirmation popup (sweetAlert) when the dismiss button is clicked. I am…
Sudhakar Samak
  • 389
  • 4
  • 15
5
votes
8 answers

SweetAlert with Angular 7

I am trying to use sweet alert in my angular project. That's how I use sweet alert: import swal from 'sweetalert'; swal({ title: "Problem", text: "Try again later!", icon: "error" }) I get the following error: ERROR in…
Paraskevas Louka
  • 223
  • 1
  • 3
  • 10
5
votes
2 answers

SweetAlert2 scrolls to initiating element after close

After closing of the modal I force the browser to scroll to the top of the page to see any error messages. After integrating the SweetAlert2 module to confirm submission the application will auto scroll back down to the submit button now after…
Raymond Holguin
  • 1,050
  • 2
  • 12
  • 35
5
votes
6 answers

Input in sweetalert 2 not typeable or cannot be typed on in materializecss modal

I have modal in which when i click add bills button it will popup the sweetalert2, the code provided below came from their documentation, so i think there is no problem with the codes, anyways, my problem is that the input cannot by type-able and it…
5
votes
2 answers

How to use date time picker in sweet alert?

This is my code i am working on swal({ title: "Confirm details?", text:'', type: "warning", customClass:…
Crazy
  • 847
  • 1
  • 18
  • 41
5
votes
1 answer

Is it possible to add checkbox in sweetAlert box?

I can set inputType as password. What are the other input Types supported..? swal({ title: "Are you sure?", type: "input", inputType: "checkbox", showCancelButton:…
Sushil Chaskar
  • 51
  • 1
  • 1
  • 3
5
votes
7 answers

How to show loading icon on sweetalert

How can I display loading icon or spin while my during ajax call. below is my code swal({ title: "Confirm your transaction", html:true, showSpinner: true, showCancelButton: true, confirmButtonColor: "#DD6B55", …
Iamgisnet
  • 171
  • 3
  • 3
  • 12
5
votes
4 answers

Javascript SweetAlert not working?

This html document
brazorf
  • 1,943
  • 2
  • 32
  • 52
5
votes
2 answers

Using SweetAlert2 to replace "return confirm()" on an ASP.Net Button

When working in ASP.Net, I often like to have "Are you sure?" popups when clicking things like a delete button. This is easily done like so:
Tyler Roper
  • 21,445
  • 6
  • 33
  • 56
5
votes
7 answers

SweetAlert Prompt issue in bootstrap modal

I have been trying for more than two days to run SweetAlert prompt in a modal bootstrap without success, the input is not accessible and I don't understand why. I need help please. $("#openSWAL").click(function(){ swal({ title: "An…
5
votes
2 answers

Using sweetalert2 with bootstrap 4

I'm using sweetAlert2 and I'm trying to use bootstrap 4 to style buttons, setting the properties: buttonsStyling: false, confirmButtonClass: 'btn btn-primary btn-lg', cancelButtonClass: 'btn btn-lg' It works, however the showLoaderOnConfirm option…
dev_054
  • 3,448
  • 8
  • 29
  • 56
5
votes
1 answer

SweetAlert dropdown dynamically add items in list

I am currently using sweetalert2 to capture user's input from the dialog. I would like to use the dropdown in chaining queue dialog but I can't seem to find a way to dynamically add items in the dropdown list. Let's say I want to retrieve data from…
stackyyflow
  • 767
  • 3
  • 11
  • 30
5
votes
2 answers

Sweet alert. Display countdown in alert box

I have an issue with displaying the countdown in sweetalert message. After click i use the "A message with auto close timer". I want that countdown to be in the message and user can see the countdown. swal({ title: "Please w8 !", text:…
Filip Martiak
  • 85
  • 1
  • 6
5
votes
1 answer

How to add event listener for html buttons in sweetalert dialog box in jquery

I am using SweetAlert box and I have three buttons, which i created using html inputs but I need to have three different click event listener performing different actions on each button click but its not working. Please help…
Mahrukh Mehmood
  • 258
  • 2
  • 5
  • 17
5
votes
2 answers

Sweet alert html option

I'm trying to make an sweet alert with the html option: swal({ title: "HTML Title!", text: "A custom html message.", html: true }); But instead of that text put a button, I have…