Adding a Red Cross donate link

For anyone who’d like to add a Red Cross donate link to their page like I have, it’s done with this bit of JavaScript code:

<script type="text/javascript">
document.write('<div style="position: absolute; left: 100%; top: 0px; overflow: visible; height: 120px; width: 120px; margin: 0 0 0 -120px; padding: 0; z-index: 9999; border: none; float: none;"><img src="" width="120" height="120" border="0" usemap="#rc"/><map name="rc"><area shape="poly" coords="0,0,120,0,120,120" href=""></area></map>');
// -->

Upload the image to your server and change the URL for the graphic.

(thanks to Brian Alvey)

3 thoughts on “Adding a Red Cross donate link”

  1. I don't understand. Why is this in a Javascript block, if all it does is document.write() some static text?

  2. If it was pure HTML it would only work if you could put it directly in the page source or template. The javascript can work in a block or as the primary or secondary links (which is how I added it to macmegasite), since those are usually inside a DIV. Adding HTML with another DIV in one of those places would mess up the page structure.

Comments are closed.

%d bloggers like this: