Most voted "sweetalert" questions
24 questions
Sort by count of
-
3
votes1
answer1596
viewsOpen page by clicking Ok - Sweetalert
I’m doing a test with the plugin SweetAlert, and would like to open a page by clicking on ok, but I couldn’t do. I ran a test using setTimeout, but she got a lot of wind... <html> <head>…
-
2
votes2
answers137
viewsOpening another page with Angular and Sweet Alert
I’m trying to open a javascript page with Angularjs. I need that when I click on Bt it asks a question and depending on the result, open a link with the url true or false. I can do this, but the…
-
2
votes2
answers453
viewsFocus on the last Jquery character
I need when the field gets the focus, the cursor to be in the last character. The way the cursor is at the beginning of the field even if the field is not empty. function gravaObs(unidadeObs) { var…
-
2
votes1
answer945
viewsHow to run a link after Sweetalert confirmation?
Link <a onClick="enviaDivida()" href="{{ route("admin.dividas.edit",$divida->id)}}" class="btn btn-sm btn-clean btn-icon btn-icon-md" title="Enviar"> <i class="la la-send"></i>…
-
1
votes1
answer377
viewsHow to use ajax inside a Sweetalert?
I tried this way, but I believe it is not the right way. I am actually sure, because the code does not work. function removeCliente(id) { swal({ title: "Are you sure?", text: "You will not be able…
-
1
votes1
answer1821
viewsAlert works and sweetalert does not
I’m trying to use sweetalert to give an alert of "Submitted". if($rstSql["cod_erro"] == 0) { echo '<script> swal("Good job!", "You clicked the button!", "success"); <script>'; } else {…
-
1
votes0
answers442
viewsSweetalert follow execution
I have the confirm below using SweetAlert. If the user clicks the cancel it for the run and goes back to the previous page correctly. But if he clicks the continue, he does nothing. How can I make…
-
1
votes2
answers1121
viewsDelete record with Laravel via AJAX
I am developing an application in PHP with Laravel and I have in my Alunoscontroller and following method: public function destroy($id) { $aluno = new Aluno(); $result =…
-
1
votes1
answer103
viewsExit Confirmation Sweetalert 2 - Angular
Boa Tarde Personal, I recently met the Sweet Alert library. I’m trying to use it to leave a page, currently count only with a Function in Typescript. I would like to know how to transfer Sweet Alert…
-
1
votes1
answer136
viewsLogic Promisses or callback with Sweetalert and Vuejs
I’m trying to make a callback to perform some functions, I don’t know if I should use Promisses, callbacks or something more advanced. This problem is more about logic I own a Mixin that triggers…
-
1
votes1
answer333
viewsUpdate sweetalert 1.x to sweetalert 2 + javascript Promises
When updating the library Sweetalert it stopped working, while debugging the error I saw that it had many modifications that made the version 1.x incompatible with the new version, so I would like…
-
1
votes2
answers3695
viewsIncrease the textarea size
I’m trying to use the Sweet Alert 2. I would like to increase the textarea field using the Rows attribute, but it is not working. How do I increase the field size? $('.btn').on('click', function(){…
-
1
votes0
answers35
viewsSweetalert does not cancel deletion
I created a deletion system with sweetalert, when clicking delete, it does not cancel the deletion. The language used is PHP without OO and PDO. Could you help me? Follow the code of the Alert and…
-
1
votes1
answer143
viewsHow to generate a dynamic ID for my Button with PHP and move to JS?
I’m trying to use PHP with Sweet Alert already tried with FIXED ID and it works. I’m trying to do that: while ($row = mysqli_fetch_assoc($sql)) { echo '<tr>'; echo '<td>' .…
-
0
votes2
answers975
viewsHow to pass the value of a php variable in a javascript link within a script
I have a script with a link and a variable, how to pass the value of this variable inside the link in the script? if($mensagem_post == "1"){ echo'<script> swal({ title: "Você tem certeza?",…
-
0
votes1
answer1584
viewsphp variable within javascript (Sweet Alert) line
I’m creating a message using the resource Sweet Alert, and where I need to present the person’s name inside a Alert coming from a variable PHP.So, I wonder how I can do it properly. Note: . The…
-
0
votes0
answers280
viewsAuthentication and Sweet Alert - Laravel
Someone could help me, I have a tremendous doubt, I have researched so much and I have not found the solution. The scenario is as follows. I created a basic project with auth through php Artisan…
-
0
votes2
answers852
viewsClose sweetalert2 when finding the data
I wish that when finding the data the sweetalert2 closed the modal. But it returns nothing in . then Here is my code: swal({ title: 'Auto close alert!', html: 'I will close in…
-
0
votes1
answer1269
viewsHow to make sweetalert to confirm deletion of records?
Hello, I would like to make a sweetalert to delete the records of my site, but do not know how to do because I do not understand javascript... Someone can give me a light ? My class/crud.php page…
-
0
votes1
answer119
viewsSweetalert with load - check if it was executed (php - jquery - ajax - sweetalert)
I want that after loading the PHP file reportas_excel.php close the swal, until this part is working. The Problem is that when you finish loading it does not generate the file…
-
0
votes2
answers172
viewsSweetalert Does Not Return False
I made some inputs in text format and then created a function in javascript to check empty fields of the same, but when I press the button next it shows the error(the normal sweetalert box…
-
0
votes1
answer42
viewsHow to restrict hours and minutes in javascript
my code it calculates how many hours a person worked total weekly and monthly now I want to make a restriction that if the weekly hourly load exceeds 30 hours and 0 minutes it emits a sweetAlert…
-
0
votes0
answers13
viewsCalling a JS file function on the front end when receiving a response from the server
I am using bootstrap Alert to send a message to the user, however, I would like to change the way messages are presented to the user, actually I do this way: <!--Mensagem de Sucesso--> <%…
-
-1
votes1
answer351
viewsPause running using Sweetalert (swal, Javascript)
Hello, Basically I have a while in Javascript running, depending on the result it presents me an informative message, I want to display this informative message and continue the execution after the…