Home » News » AJAX PopUp Politicians for Web ...

News by JavaScriptSearch


AJAX PopUp Politicians for Web Pages

 

JavaScriptSearch
Wednesday, July 26, 2006; 04:29 AM

We have every reason to believe that more and more political debate will be conducted online, and some people are moving fast to ensure that netizens stay informed.  Th non-profit Sunlight Labs have created a small AJAX widget that places voters in the U.S. one click away from extensive information about politicians, including a biography and what their stand on various topics was over the years.


The PopUp Politicians widget is a small web application, which can be integrated into any web page.  It consists of lightweight external JavaScript code (contained in the sunlightpolitags.js file) and a few lines of code added to the actual web page.  It works as a mash-up -- by instantaneously contacting the internet when the mouse cursor is placed over the name of the politician, and displaying the relevant content from several sources (including a Sunglight-Labs-provided database), in a small pop-up. 

Its creators admitted to having a limited database and said they suspect there may be bugs in the application.  Development work is in progress.  Nevertheless, if you are inclined to believe that political behaviour is rational, PopUp Politicians can be a proof that Web 2.0 technology can serve higher goals than shopping, procrastination, and gossip.

Sunlight Labs call the widget a "callable remote API for getting info about politicians." The technology is simple, and can be duplicated in any country by doing a moderate amount of data collecting. One can easily imagine that political blogs and even traditional online news services can benefit from the PopUp Politicians approach.

In order to display the pop-up that is pictured above, the webmaster has to perform two steps.  First he has to add the following into the <head> of the web page:

<script src="http://sunlightlabs.com/popuppoliticians/sunlightpopups.js"></script>

Then he simply needs to tag the name like this:

<a href="http://sunlightlabs.com/tag/Sen.+Edward+M.+Kennedy" rel="tag">Sen. Edward M. Kennedy</a> 

 

 


http://sunlightlabs.com/popuppoliticians/

Advertisement

Partners

Related Resources

Other Resources

arrow