SharePoint open a relative page inside a modal popup
<a class="icon" href="#" onclick="javascript:OpenPopUpPage('<asp:Literal runat='server' Text='<% $SPUrl:~site/SitePages/info.aspx %>'></asp:Literal>');"><span class="info"></span></a><br />
Update:
Although the solution above does work, after saving the document in SharePoint Designer, when loading it back again, SPD will wreak the html markup, crashing the site.
To avoid that, heres a new version using Literals.
<asp:Literal runat="server" text="<a onclick="javascript:OpenPopUpPage("/>
&39;<asp:Literal runat="server" text="<%$SPUrl:~site/SitePages/info.aspx%>"/>&39;
<asp:Literal runat="server" text=")" class="icon" href="#"><span class="info"></span></a>"/>
Update:
Although the solution above does work, after saving the document in SharePoint Designer, when loading it back again, SPD will wreak the html markup, crashing the site.
To avoid that, heres a new version using Literals.
<asp:Literal runat="server" text="<a onclick="javascript:OpenPopUpPage("/>
&39;<asp:Literal runat="server" text="<%$SPUrl:~site/SitePages/info.aspx%>"/>&39;
<asp:Literal runat="server" text=")" class="icon" href="#"><span class="info"></span></a>"/>
Comments
Post a Comment