I pasted the code for this Amazon Carousel Widget into the post using the HTML editor. I had just installed the tiny RawHTML plugin because it adds several convenient options to the HTML editing screen, so I also enclosed the widget code in "raw" comment tags. The syntax is <!--start_raw--><!--end_raw-->. Unexpectedly easy!
I prefer to use Amazon's Widget Source code rather than the Widget Wizard because it uses swfobject instead of <object> and <embed> tags and it does not cause XHTML pages to fail validation.
Remember to enclose the lines of script inside the <script> tag in CDATA tags for XML compatibility and comment them out so that they do not break the javascript:
/* <![CDATA[ */
[lines of code]
/* ]]> */
The Amazon carousel widget below uses Amazon-generated <object> and <embed> tags instead of the Widget Source javascript approach. I added it to test the display in IE, Firefox, and other browsers. The code is not pretty! The <object> tag invokes Internet Explorer's proprietary Active-X object and the <embed> tag is now obsolete, but still used by Mozilla and some other browsers.
This carousel previewed fine without any other tweaking, but I enclosed it in <!--start_raw--><!--end_raw--> tags anyway. I also converted all the tags to lowercase, escaped ampersands (changed & to &) and properly closed all the <param> tags within the object. I don't expect it to validate as XHTML because of the <embed> tag. See Elizabeth Castro's article "Bye Bye Embed" on A List Apart for a solution.


