Advertisement
Guest User

Untitled

a guest
Feb 27th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. {!! Form::open(array('action' => 'HomeController@gerarPdf','method' => 'POST')) !!}
  2. {!! Form::text('numeroDocumento[]', null,array(
  3. 'placeholder' => 'Código da Entidade',
  4. 'maxlength' => '5',
  5. 'required' => ''
  6. )); !!}
  7. <input type="button" value="Gerar Código" name="submitBarcode" id="submitBarcode" required/>
  8. {!! Form::close() !!}
  9.  
  10. Route::post('verificarBarcode', 'HomeController@verificarBarcode');
  11.  
  12. $('#submitBarcode').click(function () {
  13. $.ajax({
  14. type: 'post',
  15. url : 'verificarBarcode',
  16. cache: false,
  17. dataType: 'json',
  18. data: $('#formBarcodeId').serialize(),
  19. success : function(msg){
  20. if (msg.status == 0) {
  21. alert("Tem Coisa Repetida");
  22. }
  23. else{
  24. alert("Não Tem Coisa Repetida");
  25. }
  26. },
  27. error:function (xhr, ajaxOptions, thrownError) {
  28. alert(xhr.responseText);
  29. }
  30. });
  31. });,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement