I have a simple blog on my internal development site which has two posts. I use JavaScript on a custom application page to launch the Post.aspx?Id=3 page in a modal window. Works great. The only item on that post is a link to a different post, which i want to show in the same modal dialog window.

In Word (or the SharePoint UI) i try to set the target of the link i added to _self. This does not work. In fact, none of the options work and upon further inspection of the produced HTML code, the "target" tag is not even in the link. If i manually add it by editing the html in the SharePoint edit post window, it doesn't show after saving.

No matter what i do, the "target" tag is removed. How can i link to another blog post from within a modal window?

1 Answer 1


The target attribute is modified by SP.UI.Dialog to get the behaviour it thinks is the right one.

The way you can control how links behave in a SharePoint Dialog is by specifying rel attribute on your link. In your case you want sp_DialogLinkInternal like this:

<a href="/Blog/Lists/Posts/Post.aspx?ID=1" rel="sp_DialogLinkInternal">Link to post 1 (open in same dialog, if any)</a
  • This is exactly what i was looking for, thank you very much.
    – ps_md
    Commented Jul 18, 2012 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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