Prerequisites 1. SharePoint 2010 (Server or Foundation) 2. SharePoint Designer 2010 3. A created list with a lookup column, and at least one item in this list 4. 5 minutes to do this Steps 1. Connect to the site within the list you created with the SharePoint Designer. 2. Go to "Lists" and select the list you created (with the lookup column) 3. On the right hand corner, you'll see the views of the list. Open one of them by right-clicking and select "Edit File in Advanced Mode" 4. Once your page is open, be sure you are displaying the code of the page, by clicking on "Code" at the bottom of the window. 5. Prepare jQuery (if it's not already added). Keep in mind that loading jQuery two times on the same page could create some bugs. To add and load jQuery:
- Download jQuery on the official website : http://jquery.com/ - Upload it in a folder or in a document Library - Copy and paste its URL to the notepad
- Download jQuery on the official website : http://jquery.com/ - Upload it in a folder or in a document Library
- Copy and paste its URL to the notepad
6. Near the end of the page, find this piece of code :
<style type=
"text/css"
>
.ms-bodyareaframe {
padding: 0px;
}
</style>
7. Insert right after that code:
<script type=
"text/javascript"
src=
"the/path/you/paste/jquery.js"
></script>
$(document).ready(
function
() {
$(
"td[class='ms-vb2'] a"
).each(
this
).attr(
"onclick"
,
""
);
});
</script>
8. Save, reload, and enjoy !
JQuery The original forum thread JQuery .each
Naomi N edited Revision 8. Comment: Minor edit
Ed Price - MSFT edited Revision 7. Comment: Colon in title; removing first person perspective from forum links
Ed Price - MSFT edited Revision 5. Comment: Grammar, link HTML, tag
Ed Price - MSFT edited Revision 2. Comment: Cleaning up the References links
Ed Price - MSFT edited Revision 1. Comment: I updated the article to the changes made in this duplicate: social.technet.microsoft.com/.../19210.duplicate-sharepoint-2010-how-to-change-lookup-hyperlink-to-open-it-in-a-same-window.aspx
This article may benefit from the additional See Also section. Consider adding it.
Aurélien Prévot,
It looks like this was your original article. It was published, and then there were improvements made on this article and on another version you made:
social.technet.microsoft.com/.../19210.duplicate-sharepoint-2010-how-to-change-lookup-hyperlink-to-open-it-in-a-same-window.aspx
So I made your improvements (from that article) over on this article.
Please make further edits on this article. Sorry for the inconvenience!