Ver Mensaje Individual
  #3 (permalink)  
Antiguo 20/01/2016, 21:55
JimmyBrain
 
Fecha de Ingreso: noviembre-2014
Mensajes: 46
Antigüedad: 9 años, 5 meses
Puntos: 0
Respuesta: SweetAlert en OnClick usando PHP

Si , tambien lo habia intentado pero es el mismo problema , no espera la confirmacion.

Código:
<script>
function showMessage2(title, text, tip) {
    if (tip == 'ask') {
      swal({
        title: title,
        text: text,
        type: 'warning',
        showCancelButton: true,
        confirmButtonColor: '#DD6B55',
        confirmButtonText: 'Yes, delete it!',
        cancelButtonText: 'No, cancel plx!',
        closeOnConfirm: false,
        closeOnCancel: false,
		showLoaderOnConfirm:true
      },
      function(isConfirm){
        if (isConfirm) {
          return true;
        } else {
		   return false;
        }
      });
	  
    }
  }
</script>

<form action="http://www.google.com">
<input type="submit" name="none" text="Fuck" onClick="return showMessage2('test','test','ask');">
</form>