123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>Artesanos</title>
-
- <script src="jquery/dist/jquery.min.js">
- </script>
-
-
- </head>
- <body>
-
- <ons-toolbar>
- <div class="left">
- <ons-back-button>Back</ons-back-button>
- </div>
- </ons-toolbar>
-
-
-
- <script type="text/javascript">
- function getUrlVars() {
- var vars = [], hash;
- var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
- for(var i = 0; i < hashes.length; i++)
- {
- hash = hashes[i].split('=');
- vars.push(hash[0]);
- vars[hash[0]] = hash[1];
- }
- return vars;
- }
-
- nombre = decodeURIComponent(getUrlVars()["nombre"]);
- renglon = "json/MADERA.json";
-
-
- $.getJSON(renglon, function(json) {
- for (i = 0; i < json.length; i++) {
- if (json[i].Nombre == nombre) {
- break;
- }
- }
-
- var telefono = "Teléfono 1";
- var clickTel = (((json[i]["Teléfono 1"].replace('(', "")).replace(')', "")).replace('-', "")).replace(' ', "");
-
- var email = "E-mail";
-
-
- document.write("<h1 align='center'>" + json[i].Nombre + "</h1>");
-
- document.write("<h2 align='center'>" + json[i].Municipio + "</h1>");
-
- document.write("<h2 align='center'>" + json[i].Especificaciones + "</h2>");
-
- document.write("<a class='button' href='tel://" + clickTel + "'>" + "<h2 align='center'>" + json[i][telefono] + "</h2>" + "</a>");
-
- document.write("<a href='mailto:" + json[i][email] + "'>" + "<h2 align='center'>" + json[i][email] + "</h2>" + "</a>");
-
-
-
- });
-
-
-
-
-
- </script>
-
- </body>
- </html>
|