Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {!! Form::open(array('action' => 'HomeController@gerarPdf','method' => 'POST')) !!}
- {!! Form::text('numeroDocumento[]', null,array(
- 'placeholder' => 'Código da Entidade',
- 'maxlength' => '5',
- 'required' => ''
- )); !!}
- <input type="button" value="Gerar Código" name="submitBarcode" id="submitBarcode" required/>
- {!! Form::close() !!}
- Route::post('verificarBarcode', 'HomeController@verificarBarcode');
- $('#submitBarcode').click(function () {
- $.ajax({
- type: 'post',
- url : 'verificarBarcode',
- cache: false,
- dataType: 'json',
- data: $('#formBarcodeId').serialize(),
- success : function(msg){
- if (msg.status == 0) {
- alert("Tem Coisa Repetida");
- }
- else{
- alert("Não Tem Coisa Repetida");
- }
- },
- error:function (xhr, ajaxOptions, thrownError) {
- alert(xhr.responseText);
- }
- });
- });,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement