SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 2 down vote accepted

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
share|improve this answer
This is exactly what i was looking for, thank you very much. – ps_md Jul 18 '12 at 13:13

Your Answer


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.