Set Target="_blank" for specific treenode RRS feed

  • Question

  • User1109483674 posted

    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?

    Friday, November 25, 2016 4:58 PM

All replies

  • User409696431 posted

    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.

    Saturday, November 26, 2016 2:29 AM
  • User-707554951 posted

    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.

      <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 () {
            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>");

    Best regards


    Monday, November 28, 2016 9:46 AM