Friday, September 5, 2014

How to display Sharepoint List item/link in a pop-up/pop-in dialog window

Ever wondered why List items won't open in a dialog even though you have enabled "Launch forms in a dialog?" setting of the List?
Well wonder no more, and just create the popup yourself! Use this code:
<a href="javascript:OpenPopUpPage('http://mysite/Lists/Announcements/DispForm.aspx?ID={@ID}')"  >
<xsl:value-of select="substring(@Title, 1, 27)" />...</a>


btw, the code includes trimming text to 27 characters and inserting "..." in the end. Works!

No comments:

Post a Comment