Setting a link target="_blank" does not open a popup window. It opens, for most people using modern browsers, a new tab. Depending on the individual user's browser settings, it may open, instead, a new, full window. It is not your choice which one happens.
Neither case is a popup window, which would normally mean a smaller window appearing over the existing page.
For your problem, based on the treeview node’s id displayed in browser(you could use F12 to find treenode's id),
TreeView1ti(i start from 0),
So, you could use add click event to specific node.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#TreeView1t3").click(function () {
openWin();
})
})
function openWin() {
var myWindow = window.open("", "MsgWindow", "width=200,height=100");
myWindow.document.write("<p>This is 'MsgWindow'. I am 200px wide and 100px tall!</p>");
}
</script>
Best regards
Cathy
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
1 Points
7 Posts
Set Target="_blank" for specific treenode
Nov 25, 2016 04:58 PM|Fredy511|LINK
I am using VS 2013, and have a treeview menu, i would like to open a popup window only for an specific item on my menu, is it possible?
Contributor
5921 Points
2450 Posts
Re: Set Target="_blank" for specific treenode
Nov 26, 2016 02:29 AM|KathyW|LINK
Can you first clarify what you are trying to do?
Setting a link target="_blank" does not open a popup window. It opens, for most people using modern browsers, a new tab. Depending on the individual user's browser settings, it may open, instead, a new, full window. It is not your choice which one happens. Neither case is a popup window, which would normally mean a smaller window appearing over the existing page.
Star
8670 Points
2882 Posts
Re: Set Target="_blank" for specific treenode
Nov 28, 2016 09:46 AM|Cathy Zou|LINK
Hi a Fredy511,
For your problem, based on the treeview node’s id displayed in browser(you could use F12 to find treenode's id),
TreeView1ti(i start from 0),
So, you could use add click event to specific node.
Best regards
Cathy
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.