Forum Moderators: open
i want to serve this data embedded in a graphic much like alexa serves their traffic rank data via their graphical traffic button.
i can dynamically generate the graphic using a third party aspjpeg component. but i have no idea how to serve this graphic to each site using external javascript the way alexa does it.
can someone please walk me through the principle (and hopefully steps) required to accomplish this. or maybe provide a link to a resource where i can learn to do this. can't seem to find the right search phrase required to google such a tutorial.
====
alexa's snippet that embeds their traffic button:
<SCRIPT type='text/javascript' language='JavaScript' src='http://xslt.alexa.com/site_stats/js/t/b?url=www.targetwebsite.com'></SCRIPT>
but may i ask, why do most sites providing this sort of functionality serve their graphic buttons via external javascript? is there an advantage to this? what am I missing if I serve my graphic button via this simple method that you outlined?
The disadvantage to the scripting method is that web browsers with javascript disabled won't load up the image. paulantony's suggestion will work on more browsers.
so the snippet I will be providing to interested webmasters will look something like this then:
<a href="http://mysite.com/targetpage.asp"><img src="http://mysite.com/generateimage.asp" width="XX" height="XX" alt="image description"></img></a>
is this really this simple?
am i not missing anything?
thanks guys.