views:

27

answers:

2

For example we want to be able to give our vendors javascript code and once embedded, it would show a badge on their site and show how long they have been doing business with us.

Thank You

+1  A: 

It shouldnt be too hard.

I recommend providing a link to an dynamic image with a querystring that contains their vendor id. The server would then render a badge with their specific details on it eg

<img src='http://www.x.com/vendor.gif.aspx?id=123' style='width:50px; height:50px'/>

This will be much easier for you to implement and much easier for the vendors to integrate. It will also work for users without JavaScript enabled.

James Westgate
I don't want to show the vendor ID like that. I am assuming it can encrypted?
jini
You can give them a public id and map it to their real id on the server.
James Westgate
A: 

Have a look at existing badges. Typically you'll find some custom javascript code and some URL, which points to a web service (on your site) publishing the desired data.

Here's an example from twitter:

<script src="http://twitter.com/javascripts/blogger.js" type="text/javascript">
<!--mce:0-></script>

<script src="http://twitter.com/statuses/user_timeline/HanSolo.json?   
   callback=twitterCallback2&amp;count=5" type="text/javascript">
   <!--mce:1--></script>

If your data is somewhat static, you might be well served with just an image tag (as proposed by James Westgate).

The MYYN