Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm just getting started with SharePoint 2010 so that may not even be the right way to phrase the question. What I have is a list with a hyperlink column containing a URL to an external web page. What I'd like to do is display that web page in a form when an item is opened.

My thought was that I could add some type of web part (page viewer?) to the dispform.aspx and somehow dynamically construct the URL from whatever item had been opened with the form.

Thanks in advance.

share|improve this question
add comment

1 Answer 1

You could add an iFrame to the disp.aspx page, then just set the src attribute of that iFrame using JavaScript.

This is probably easiest to add in an HTML Form WebPart in 2010. You could edit the source to something like this:

<iframe id="iframePreview" />

<script type="text/javascript">

var url = "http://www.microsoft.com";
var iframe = document.getElementById("iframePreview");
iframe.setAttribute("src", url);

</script>

You would just need to fetch the url from the field you want.

share|improve this answer
    
Thanks Omar. This will be helpful. –  Max Apr 10 at 12:19
add comment

Your Answer

 
discard

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.