views:

101

answers:

1

What is the best way to develop a widget from a RSS feed

  1. which renders uniformly across all websites and browsers

  2. which can be embedded easily on other websites without facing any problem?

i have tried below approaches but each of them has their own problems

Using Javascript: when embedding such widgets into other websites the style of this widget is getting overlapped with website's style.Because of this it is not rendering uniformly in all websites.

Using html/IFrame: As iframe is being embedded on other websites, i could not able to set the size of an iframe dynamically using javascript (cross domain scripting is not allowed) as per the content.Because of which scroll bars are coming into picture.Which is bad? and NO users will embed a widget.

So any guidelines/suggestions on how to develop a widget which renders uniformly across all websites with out any problem?

+1  A: 

The style problem is more easily solvable of the two. If you render using Javascript, you can inject your own CSS rules that would apply only to your widget. For example you could put an ID on the widget's outer DIV, and scope all the rules through that ID:

#widget *  { 
  font-family: Verdana;
  text-size: 12px;
}

#widget a:link {
  color: blue;
  text-decoration: underline; 
  cursor: pointer;
}

And so on.

To resolve the frame resizing issue, you would need some code to be hosted on the server of the page you are embedding into, and some pretty crafty scripting to facilitate a frame communications layer.

levik
Other than these two , Are there any other ways to develop widget?
Rama Vadakattu
There's also Flash, but if you don't want to resort to non-HTML content, your only options are to inject the HTML into the page via Javascript, or to stick it into an IFrame.
levik
Thanks for the clarification.
Rama Vadakattu