SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I have a library with PDF documents in it and a content editor web part underneath. When I select a PDF item I would like it to display in the <iframe>. I can accomplish this with a static URL currently but I am having trouble dynamically getting the item URL and refreshing the <iframe>. I am guessing I will need to use javascript to accomplish this.

Has anyone every tried anything like this before?


share|improve this question
up vote 0 down vote accepted

Is this in 2010 or 2007. Its been years but I think I did something where there was a library and a page viewer web part. Clicking the item in the library changed the page viewer. I think I targeted the IFrame ID with an on-click event. I believe I went off of someone elses post to accomplish this. Ill see if I cant dig it up somewhere.

share|improve this answer
I was able to accomplish this exactly has you suggested. I created a link and targeted an iframe to open one link and used an onclick event to open a second link in a second iframe. Thanks for the suggestion. – kds6253 May 16 '12 at 16:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.