0

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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