XHTML Compliant Code for your SpringWidget

SpringWidgets

Feedburner recently added support for SpringWidgets.

When trying to add the widget to my site, I realized that SpringWidgets is using the embed tag. e.g. my widget

Now, the embed tag is obsolete in XHTML, i.e. if you use it, then the W3C Validator will throw errors.

Here is what you can do to solve that…

In XHTML in order to embed flash we have to use the object tag. Normally, this would have been simple, but SpringWidgets requires the feed url to be passed using the flashvars attribute of the embed tag.

The XHTML equivalent when using object is to do the same using using the param tag with name FlashVars.

So before you start your code, here is what you will need to do.

Configure the RSS Widget with the size you want and the feed you wish to embed and generate the code for the same.

The main things you will need are:

  • The source of the embed, usually http://downloads.thespringbox.com/web/wrapper.swf
  • the value of flashvars attribute; for me it is file=http://downloads.thespringbox.com/widgets/RSS Reader.sbw&param=http%3A%2F%2Ffeeds.feedburner.com%2FTechtites&memberId=thespringbox
  • the width and height

Use the code below to embed your file.

XHTML Code:


You will need to replace the value of the FlashVars param with your code, as well as the value of the href value of the a tag with that of your own.

Once you are done with this, you will be able to view your widget. Here is mine:

Get this widget!

I think I will write a WordPress plugin for this The Springwidgets Plugin is now available! :)

Comments (4)
  1. Don Synstelien November 12, 2006
  2. Ajay November 12, 2006
  3. Jesse November 13, 2006
  4. Ajay November 13, 2006

Leave a Reply

%d bloggers like this: