daily pastebin goal
29%
SHARE
TWEET

Untitled

a guest Mar 26th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. Template name: Page - VIN
  4. */
  5. get_header(); ?>
  6.  
  7. <div id="content" role="main">
  8.     <label for="vin">Insert vin</label>
  9.     <input type="text" name="vin" id="vin">
  10.     <input type="button" id="getvin" value="get vin data">
  11.     <div id="vinresult"></div>
  12. </div>
  13.  
  14. <?php get_footer(); ?>
  15. <script>
  16.     jQuery(document).ready(function() {
  17.         jQuery("#getvin").click(function () {
  18.             var $vin = jQuery("#vin").val();
  19.             var jqxhr = jQuery.get( "http://XXX/parseVin.php",
  20.                 {
  21.                     vin: $vin
  22.             }, function() {
  23.             })
  24.                 .done(function(data) {
  25.                     window.vinresult = data;
  26.                     console.log(data);
  27. var html = "";
  28.                     jQuery(window.vinresult).each(function(e, k){
  29. html += k.r + ": "  + k.v + "<br>";
  30.                     });
  31.                     jQuery("#vinresult").html(html);
  32.  
  33.                 });
  34.         });
  35.     });
  36. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top