Amazon Book Rec Widget
Between HEAD tags (for easier updating):
<!-- Array of ASINs for Amazon Book Rec Snippet -->
<script type="text/javascript">
<!--
// An array containing the asins for books
books = new Array(3);
books[0] = "0688172172";
books[1] = "0140434453";
books[2] = "0140433872";
// -->
</script>
Between BODY tags:
<!-- Amazon Code Snippet (author: tatwell@gmail.com) -->
<script language="JavaScript"><!--
// An array containing the asins for books
index = Math.floor(Math.random() * books.length);
document.write("<iframe src='http://rcm.amazon.com/e/cm?t=YOURTAG&o=1&p=8&l=as1&asins="
+ books[index] +
"&fc1=666666&lc1=cbc1a3&bc1=cbc1a3&npa=1<1=_blank&IS2=1&bg1=ffffff&f=ifr'width='120' height='240' scrolling='no' marginwidth='0' marginheight='0'frameborder='0'></iframe>");
//done
// --></script>
<!-- END tatwell's Amazon snippet -->
GET variables:
t = your Amazon Associates tag
o = ?
p = ?
l = ?
fc1 = font color
lc1 = link color
bc1 = border color
lt1 = link target
bg1 = background color
What it produces is a display like this that will randomly choose a selection from your array:
<!-- Array of ASINs for Amazon Book Rec Snippet -->
<script type="text/javascript">
<!--
// An array containing the asins for books
books = new Array(3);
books[0] = "0688172172";
books[1] = "0140434453";
books[2] = "0140433872";
// -->
</script>
Between BODY tags:
<!-- Amazon Code Snippet (author: tatwell@gmail.com) -->
<script language="JavaScript"><!--
// An array containing the asins for books
index = Math.floor(Math.random() * books.length);
document.write("<iframe src='http://rcm.amazon.com/e/cm?t=YOURTAG&o=1&p=8&l=as1&asins="
+ books[index] +
"&fc1=666666&lc1=cbc1a3&bc1=cbc1a3&npa=1<1=_blank&IS2=1&bg1=ffffff&f=ifr'width='120' height='240' scrolling='no' marginwidth='0' marginheight='0'frameborder='0'></iframe>");
//done
// --></script>
<!-- END tatwell's Amazon snippet -->
GET variables:
t = your Amazon Associates tag
o = ?
p = ?
l = ?
fc1 = font color
lc1 = link color
bc1 = border color
lt1 = link target
bg1 = background color
What it produces is a display like this that will randomly choose a selection from your array:
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home