Last active
April 17, 2024 04:48
-
-
Save wpInam/b94eee1c05344412a6064287d670f339 to your computer and use it in GitHub Desktop.
Types Of Ajax Call
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- To check which are the pages index --> | |
site:lcm-calculator.com | |
<!-- | |
data-formAction="{{ route('calculation', ['functionName'=> 'rootCalculator']) }}" | |
--> | |
<script> | |
var formData = { expr: inputVal, round: roundVal }; | |
var url = $('.avc-calculator').attr('data-formAction'); | |
$.ajax({ | |
type: "POST", | |
url: url, | |
headers: { "X-CSRF-TOKEN": $('meta[name="_token"]').attr("content"), }, | |
data: formData, | |
dataType: 'json', | |
timeout: 6000, | |
beforeSend: function () { | |
$('.loader-wrapper').fadeIn('slow') | |
}, | |
success: function (data) { }, | |
error: function (error) { }, | |
}) | |
</script> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment