What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-12 23:44:05
xhr post send
var xhr = new XMLHttpRequest(); xhr.open("POST", '/url', true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { // Call a function when the state changes. ... Add solution -
Javascript 2021-10-11 08:05:19
Authentication handling in javascript
var token_ // variable will store the token var userName = "clientID"; // app clientID var passWord = "secretKey"; // app clientSecret var caspioTokenUrl = "https://xxx123.caspio.com/oauth/token"; // Your application token en... Add solution -
Javascript 2021-10-07 23:56:04
download audio file javascript
var filename = url.substring(url.lastIndexOf("/") + 1).split("?")[0]; var xhr = new XMLHttpRequest(); xhr.responseType = 'blob'; xhr.onload = function() { var a = document.createElement('a'); a.href = window.URL.createObj... Add solution -
Javascript 2021-10-02 22:05:04
js code for webpage download progress bar
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id="a1" data-filename="filename.xml">Click to download</div> <script> $('#a1').click(function() { ... Add solution -
Javascript 2021-09-30 17:51:03
what's the logic of ajax
function loadDoc() { //step 1. as you clearly understand var xhttp = new XMLHttpRequest(); //step 2. Here you are defining the function that should run once the data is 'ready' xhttp.onreadystatechange = function() { if (this.readyState == 4 ... Add solution -
Javascript 2021-09-25 20:37:02
xmlhttprequest javascript
var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { // Typical action to be performed when the document is ready: document.getElementById("demo").i... Add solution