W3Data Http

Toggle navigation
TUTORIAL HOME
W3Data Http
❮ Previous Next ❯
The examples on this page are the same as the examples on the previous page, except that the data are requested from a web server: customers.php

Filling a Dropdown
Example

{{CustomerName}}

w3Http(“customers.php”, function () {
    if (this.readyState == 4 && this.status == 200) {
        var myObject = JSON.parse(this.responseText);
        w3DisplayData(“id01”, myObject);
    }
});

»
Filling a List
Example

     

  • {{CustomerName}}

w3Http(“customers.php”, function () {
    if (this.readyState == 4 && this.status == 200) {
        var myObject = JSON.parse(this.responseText);
        w3DisplayData(“id01”, myObject);
    }
});

»
Filling a Table
Example

 

   

   

   

 

 

 

 

 

 

Customer City Country
{{CustomerName}} {{City}} {{Country}}

w3Http(“customers.php”, function () {
    if (this.readyState == 4 && this.status == 200) {
        var myObject = JSON.parse(this.responseText);
        w3DisplayData(“id01”, myObject);
    }
});

»
Filling Another Table
Example

 

   

   

   

 

 

 

 

 

 

Title Artist Price
{{title}} {{artist}} {{price}}

w3Http(“customers.php”, function () {
    if (this.readyState == 4 && this.status == 200) {
        var myObject = JSON.parse(this.responseText);
        w3DisplayData(“id01”, myObject);
    }
});

»

❮ Previous Next ❯

Leave a comment