|
Instructions for Embedding a Cost of War CounterThere are two different ways to embed the cost of war counter in your own website. The first attempt at creating an embeddable counter worked but produced a counter that was too large and didn't fit in with the look of many pages that wanted to use it. So we have also provided a longer snipper of HTML that you can cut and paste which should produce a smaller, more malleable counter. I recommend using the newer method even though it involves more HTML as the the result will integrate more smoothly with your web page. However, the older method is still listed here if you prefer. Notes: At the last testing neither version described below works at myspace.com. They do not allow the use of javascript or iframes. I have set up the example counters on this page to increment more slowly than they will on your site so as to avoid overwhelming people's computers. New Method --- Create the structure directly within your web pageThis technique involves cutting and pasting the most HTML, but the results should fit cleanly into the look of your page and can be easily customized. You should feel free to rearrange the pieces to fit within your own webpage as long as you keep the relative order of the elements the same. Technical Details: Basically, you need to include the cost of war javascript and an element with an id of 'raw'. The cost of war javascript will replace the contents of the 'raw' element with the current total cost of the war. If you'd like to adjust the rate at which the counter increments, you can do so by changing the line that reads 'inc_totals_at_rate(100);' to use some other number; the higher the number, the slower the counter will increment. Note that the script element containing the call to inc_totals_at_rate() must appear after the element named 'raw'. If you paste this code into your HTML, the counter will simply appear inline on your web page like so. Note that it will increment more smoothly on your web site than it does here. Pointing directly at costofwar.comCost of the War in Iraq
(JavaScript Error)
Older Method --- Use an Inline Frame ElementYou can embed a Cost of War counter in your own website! Simply include the following HTML, and you'll have an embedded counter that looks like the one below: If you'd like to customize it's appearance, use the newer method above. |