@manhnguyenv

Welcome to my blog!

jQuery call Ajax

December 21, 2017 17:41

Snackbar / Toast
https://www.w3schools.com/howto/howto_js_snackbar.asp

jQuery Toast
https://www.jqueryscript.net/demo/jQuery-Bootstrap-Based-Toast-Notification-Plugin-toaster/

jQuery Confirm
https://craftpip.github.io/jquery-confirm/

jQuery Ajax
https://randomuser.me/

Toast Notification
https://github.com/CodeSeven/toastr
https://codeseven.github.io/toastr/
http://codeseven.github.io/toastr/demo.html

Bootstrap Notify
http://bootstrap-notify.remabledesigns.com/
http://bootstrap-notify.remabledesigns.com/
https://github.com/mouse0270/bootstrap-notify

ngToast
http://tamerayd.in/ngToast/

ngConfirm
https://craftpip.github.io/angular-confirm/

ASP.NET MVC + Toast
http://rahulrajatsingh.com/2014/07/javascript-toast-notification-for-the-websites-and-html5-apps-using-toastr-js/

jQuery Selectables Plugin Demo
https://www.jqueryscript.net/demo/jQuery-Plugin-To-Enable-Multi-Rows-Selection-On-Table-Row-Selector/

Runable

<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript">
$( document ).ready(function() {
$('#singleAmountForm').submit(function (e) {
e.preventDefault();
singleAmount =$("#singleAmount").val();
if (confirm("Are you sure you want to submit the value of " + singleAmount + " ?"))
{
$('#myText').val('loading . . .');
displayText();
}
});
});
function displayText(){
$.ajax({
type: "GET",
dataType: 'json',
url: "https://api.github.com/users/manhnv83",
success: function(data) {
$('#myText').text(JSON.stringify(data));
}
});
}
function getUsers(){
$.ajax({
url: 'https://randomuser.me/api/',
dataType: 'json',
success: function(data) {
console.log(data);
}
});
}
//https://randomuser.me/
</script>
</head>
<body>
<div id="myText">Replace me!!</div>
<form id="singleAmountForm" method="post" action="">
<input type="hidden" name="singleAmount" value="singleForm">
<label for="singleAmount">SINGLE AMOUNT :</label>
<input type="text" id="singleAmount" name="singleAmount" autocomplete="off">
<input type="submit" class="myButton" value="Submit">
</form>
</body>
</html>

Categories

Recent posts