skip to Main Content

Jquery ajax – Render a view with errors and input that can be returned to AJAX

I have a basic form that collects user information (name, surname, etc) An example of one input field: <div class="form-group"> <label for="name">Name</label> <input type="text" class="form-control" id="name" name="name" value="{{ old('name', $user->name) }}"> @if ($errors->has('name')) <span class="help-block"> <strong>{{ $errors->first('name') }}</strong> </span> @endif…

VIEW QUESTION

Jquery ajax – AJAX Post twice in Laravel framework

i was searching in stackoverflow with the same title, but i got no luck.. this is my ajax script $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('input[name="_token"]').val() } }); $('#btn-submit').on('click', function(e) { e.preventDefault(); var nama_kelompok_jalan = $('input[name="nama"]').val(); var action = $('#csrf-token').attr('action'); $.ajax({ type:'POST',…

VIEW QUESTION
Back To Top
Search