Use Content Editor and iframe to Dynamically Display Selected PDF
-
09-12-2019 - |
Question
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?
Thanks
Solution
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.