views:

1026

answers:

4

I want to embed a wikipedia article into a page but I don't want all the wrapper (navigation, etc.) that sits around the articles. I saw it done here: http://www.dayah.com/periodic/. Click on an element and the iframe is displayed and links to the article only (no wrapper). So how'd they do that? Seems like JavaScript handles showing the iframe and constructing the href but after browsing the pages javascript (http://www.dayah.com/periodic/Script/interactivity.js) I still can't figure out how the url is built. Thanks.

A: 

You could always download the site and scrap it. I think everything inside <div id="bodyContent"> is the content of the article - sans navigation, header, footer, etc..

Don't forget to credit. ;)

Till
I need it to be a dynamic link so that as people update the article it is updated on my page.
mrjrdnthms
+6  A: 
VolkerK
Not sure why someone bumped you down, but it looks like you are correct.
Jim McKeeth
me neither. Maybe the actual code snippet is convincing enough ;)
VolkerK
+2  A: 

@VolkerK is right, they are using the printable version.

Here is an easy way to find out when you know the site is displaying the page in an iframe.

In Firefox right click anywhere inside the iframe, from the context menu select "This Frame" then "View frame info"

You get the info you need including the Address:

Address: http://en.wikipedia.org/w/index.php?title=Chromium&amp;printable=yes

Pat
A: 

The jQuery library lets you specify part of a page to retrieve by an Ajax call, with a CSS-like syntax: http://docs.jquery.com/Ajax/load

Henrik N