/* Document : Label Panel Readme Created on : Jan 17, 2011, 15:24:18 Author : Lance Andersen */ Label Panel Documentation Introduction ------------------------------------------------------------ A simple javascript library to allow affiliate websites to display Product Label information. It relies on jquery http://jquery.com and jquery's implementation of the jsonp spec described at http://en.wikipedia.org/wiki/JSON#JSONP It is coupled with a php script that can be called directly if needed Example ------------------------------------------------------------ http://healthstoreonline.net/label/healthproductlabel.html Steps to Use ------------------------------------------------------------ 1. Link to the files. copy the following 3 lines into the head of your html document: 2. setup the html. create a div with an id of 'label_panel' such as:
3. call the javascript function. pass in the upc of the desired label panel to the function. jquery example: - alternately if you want to do something with the label panel html other than the default of replacing the contents of the label_panel div you can add a second parameter to the healthproductlabel function as a callback jquery example: Using without javascript ------------------------------------------------------------ For server side implementations there is an api that can be called the url is at http://healthstoreonline.net/label/healthproductlabel.php GET parameters are as follows: upc - upc number for label type - format for the results to be sent as. valid types are xml, html, json, jsonp(default) callback - name of a javascript function to be called this is only used for the jsonp format ex. http://healthstoreonline.net/label/healthproductlabel.php?upc=02124567866&type=html