SmartChoice
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> | |
| </head> | |
| <body> | |
| <div id="id01" class="w3-container" ></div> | |
| <script> | |
| var xmlhttp = new XMLHttpRequest(); | |
| var url = "http://www.standardinsights.io:8080/ecomapp/data.jsp"; | |
| xmlhttp.onreadystatechange = function() | |
| { | |
| if (this.readyState == 4 && this.status == 200) { | |
| var myArr = JSON.parse(this.responseText); | |
| myFunction(myArr); | |
| } | |
| }; | |
| xmlhttp.open("GET", url, true); | |
| xmlhttp.send(); | |
| function myFunction(arr) | |
| { | |
| var out ='<div class="w3-col-cotainer w3-row w3-padding-16 w3-border w3-center ">' + | |
| '<h5>These Products are highly recommend for you</h5>' ; | |
| var i; | |
| for(i = 0; i < arr.length; i++) | |
| { | |
| out += '<table class="w3-table-all w3-col m2 w3-padding-16 w3-border" style="margin-left:16px">'+ | |
| '<tr height="200px"><td style="vertical-align: middle; text-align: center"><img style="width: 150px; height: 150px;" src="'+ arr[i].img +'" width="100" height="100"><td><tr> '+ | |
| '<tr height="100px"><td style="vertical-align: middle; text-align: center"><a href = "'+arr[i].url+'"> ' + arr[i].name + '</a></td></tr>'; | |
| } | |
| out=out + '</div>'; | |
| document.getElementById("id01").innerHTML = out; | |
| } | |
| </script> | |
| </body> | |
| </html> | |
Sorry, there are no products in this collection