VIN Decoding API |
VIN Decoding API |
Chris619 |
Dec 2 2016, 05:24 PM
Post
#1
|
Newbie Group: Members Posts: 10 Joined: 2-December 16 Member No.: 24,951 |
I'm trying to create an internal VIN Decoding website that pulls data from an external site. I'm a newbee so please dont tear me apart with negative comments I have the link to the API, i have the API key but the results i get after entering VIN is in JSON format.
Link Example: https://api.mywebsite.com/api/vehicle/vins/...p;api_key=mykey First question is, how do I trigger the submit button to request decode of the vin entered in the text box, into the link example shown above. The only field that will change on the link will be the VIN which in this case is represented by 4T1BK1EB6DU056165. CODE <input id="id1" type="vin" max="17"> <button onclick="myFunction()">Submit</button> And once I get the response in JSON, how do I display the code with styling in html? I tried the following code but no results CODE function setup() { loadJSON("https://api.mywebsite.com/api/vehicle/vins/4T1BK1EB6DU056165?&fmt=json&api_key=mykey", gotData, 'jsonp); Thanks any help you can give... This post has been edited by Chris619: Dec 2 2016, 05:27 PM |
CharlesEF |
Dec 6 2016, 07:25 PM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
Well, you need to be careful with w3schools also. They have their own set of problems. I myself don't know of a good source for beginners.
Actually, the code I posted will most likely not work for you. I only showed you what you asked, how to build the link. The problem is what is going to happen with the data returned? If the data is returned in JSON format then you need to handle that data and display it in the web page. I think you need to make an AJAX request and handle the data that is returned. |
Lo-Fi Version | Time is now: 28th March 2024 - 12:12 PM |