Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Looknig for an editable treeview

Posted on 2001-08-13
7
Medium Priority
?
406 Views
Last Modified: 2012-05-04
I need a script to edit a treeview inside a browseer.  It need to be scripting language, VBscript or Javascript, do anyone know if such script exist somewhere?

I need to be able do drag and drop from the tree to move item up and down inside the browser.  The page is in ASP.
0
Comment
Question by:dabellei
7 Comments
 
LVL 13

Expert Comment

by:gbanik
ID: 6381404
You could use the Simple VB Tree Control for that or create your own control with the Tree Control embedded in it. Have you object placed in the ASP Page (actually executed at the Client). Use <CodeBase> Tag to avoid the control being installed at the client machine (at the client browser would call it).

All in all.... make your control whatever u want in VB. And then port it to your ASP Page. If you need help on how to pass data to your control from ASP... ask me?

GB.
0
 
LVL 2

Author Comment

by:dabellei
ID: 6381577
I don't really want to use VB in any way, no activeX at all, pur ASP code, VBSCript is ok or JavaScript, I need to run this over netscape or IE on PC or MAC as well.

And over all I need the Drag and Drop functionnality
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 28

Expert Comment

by:AzraSound
ID: 6381933
anything using only script is going to be slow...

one of the best out there is here:
http://www.ivanpeters.com/

youll notice its not very fast, but that is all you can expect using purely script
0
 
LVL 1

Accepted Solution

by:
raj_selvam earned 1200 total points
ID: 6382766
If ur using javascript then follow this code.


=======================
<html>
<head>
<script LANGUAGE="JScript"><!--

var eFilterTableSelected = null;            // currently selected category folder
function SetupPage()
{
      folder_click( window.tblAll );
}

// Cursor is over a catgegory folder
function folder_mouseover(eTable)
{
      var srcImg = eTable.rows[0].cells[0].children[0].src;
      srcImg = srcImg.substr( 0, srcImg.length-5 ) + "1.gif"
      eTable.rows[0].cells[0].children[0].src = srcImg;
}

function folder_mouseout(eTable)
{
      if( eTable != eFilterTableSelected )
      {
            var srcImg = eTable.rows[0].cells[0].children[0].src;
            srcImg = srcImg.substr( 0, srcImg.length-5 ) + "0.gif"
            eTable.rows[0].cells[0].children[0].src = srcImg;
      }
}

// Cursor click on category folder
function folder_click(eTable)
{
      event.cancelBubble = true;

      if( eFilterTableSelected == eTable )
            return;

      var eText = eTable.rows[0].cells[1];
      eText.style.backgroundColor="#000080";
      eText.style.color="#FFFFFF";
      eText.style.fontWeight="bold";

      var eOldSelected = eFilterTableSelected;
      eFilterTableSelected = eTable;

      if( eOldSelected != null )
      {
            eText = eOldSelected.rows[0].cells[1];
          eText.style.backgroundColor="";
            eText.style.color="";
            eText.style.fontWeight="";

            folder_mouseout(eOldSelected);
      }
}
function group_click(eTable)
{
      // Check current state, and invert
      var bExpand;
      if( eTable.rows[1].cells[1].children[0].style.display == "none" )
            bExpand = true;
      else
            bExpand = false;

      // change the image
      var srcImg = eTable.rows[0].cells[0].children[0].src;
      srcImg = srcImg.substr( 0, srcImg.length-5 );
      srcImg += bExpand ? "1.gif" : "0.gif";
      eTable.rows[0].cells[0].children[0].src = srcImg;

      // toggle folder visibility
      var numFolders =       eTable.rows.length;
      var strDisplay = bExpand ? "block" : "none";

      for( i = 1; i < numFolders; i++ )
            eTable.rows[i].cells[1].children[0].style.display = strDisplay;
}


// Called when the filter selection is changed
function filter_onchange(strFilter)
{
      var m_strFilter = strFilter;
      strFilterExpression = m_strFilter;
      update_main();
}
function update_main()
{
      alert(strFilterExpression);
//      window.parent.frames.banner.refresh_tab( getFilterURL() );
}

function getFilterURL()
{
      // return selected item from tree
}

--></script>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<title>Date Range</title>
</head>

<body topmargin="0" background="back.gif" ONLOAD="SetupPage();">

<table border="0" cellspacing="0" cellpadding="2">
  <tr>
    <td>
      </td>
    <td>
            <table ID="tblAll" border="0" cellspacing="0" cellpadding="0" style="font-family: Verdana; font-size: smaller; cursor:hand;" ONMOUSEOVER="folder_mouseover(this);" ONMOUSEOUT="folder_mouseout(this);" ONCLICK="folder_click(this);">
                  <tr>
                        <a href="javascript:filter_onchange(&quot;all&quot;)">
                        <td>
                              <img src="..\Filter\all1.gif">
                        </td>
                        <td>&nbsp;All&nbsp;
                        </td>
                        </a>
                  </tr>

                  <tr>
                        <td></td>
                        <table border="0" cellspacing="0" cellpadding="0">
                        <table border="0" cellspacing="0" cellpadding="0" Title="Click to Display/Hide Categories" style="font-family: Verdana; font-size: smaller; cursor:hand;"  ONCLICK="group_click(this);"><tr><td><img src="..\Filter\expand0.gif"></td><td><img src="..\Filter\group.gif">&nbsp;x</td></tr><tr><td></td><td>

                        <table border="0" cellspacing="0" padding="2" Title="Show Mobiles from this Category Only" style="display: none; font-family: Verdana; font-size: smaller; cursor:hand;" ONMOUSEOVER="folder_mouseover(this);" ONMOUSEOUT="folder_mouseout(this);" ONCLICK="folder_click(this);"><tr><a href="javascript:filter_onchange(&quot;type:1&quot;)"><td><img src="..\Filter\folder0.gif">&nbsp;</td><td>1</td></a></tr>

                        </table></td>

                        </table>

                        <table border="0" cellspacing="0" cellpadding="0" Title="Click to Display/Hide Categories" style="font-family: Verdana; font-size: smaller; cursor:hand;"  ONCLICK="group_click(this);"><tr><td><img src="..\Filter\expand0.gif"></td><td><img src="..\Filter\country.gif">&nbsp;xx</td></tr><tr><td></td><td>

                        <table border="0" cellspacing="0" padding="2" Title="Show Mobiles from this Category Only" style="display: none; font-family: Verdana; font-size: smaller; cursor:hand;" ONMOUSEOVER="folder_mouseover(this);" ONMOUSEOUT="folder_mouseout(this);" ONCLICK="folder_click(this);"><tr><a href="javascript:filter_onchange(&quot;2&quot;)"><td><img src="..\Filter\folder0.gif">&nbsp;</td><td>2</td></a></tr>


                        </table></td><tr><td></td><td>


                        <table border="0" cellspacing="0" padding="2" Title="Show Mobiles from this Category Only" style="display: none; font-family: Verdana; font-size: smaller; cursor:hand;" ONMOUSEOVER="folder_mouseover(this);" ONMOUSEOUT="folder_mouseout(this);" ONCLICK="folder_click(this);"><tr><a href="javascript:filter_onchange(&quot;3&quot;)"><td><img src="..\Filter\folder0.gif">&nbsp;</td><td>3</td></a></tr>

                        </table></td><tr><td></td><td>


                        <table border="0" cellspacing="0" padding="2" Title="Show Mobiles from this Category Only" style="display: none; font-family: Verdana; font-size: smaller; cursor:hand;" ONMOUSEOVER="folder_mouseover(this);" ONMOUSEOUT="folder_mouseout(this);" ONCLICK="folder_click(this);"><tr><a href="javascript:filter_onchange(&quot;4&quot;)"><td><img src="..\Filter\folder0.gif">&nbsp;</td><td>4</td></a></tr>

                        </table></td><tr><td></td><td>


                        <table border="0" cellspacing="0" padding="2" Title="Show Mobiles from this Category Only" style="display: none; font-family: Verdana; font-size: smaller; cursor:hand;" ONMOUSEOVER="folder_mouseover(this);" ONMOUSEOUT="folder_mouseout(this);" ONCLICK="folder_click(this);"><tr><a href="javascript:filter_onchange(&quot;5&quot;)"><td><img src="..\Filter\folder0.gif">&nbsp;</td><td>5</td></a></tr>


                        </table></td><tr><td></td><td>


                        <table border="0" cellspacing="0" padding="2" Title="Show Mobiles from this Category Only" style="display: none; font-family: Verdana; font-size: smaller; cursor:hand;" ONMOUSEOVER="folder_mouseover(this);" ONMOUSEOUT="folder_mouseout(this);" ONCLICK="folder_click(this);"><tr><a href="javascript:filter_onchange(&quot;6&quot;)"><td><img src="..\Filter\folder0.gif">&nbsp;</td><td>6</td></a></tr>


                        </table></td><tr><td></td><td>


                        <table border="0" cellspacing="0" padding="2" Title="Show Mobiles from this Category Only" style="display: none; font-family: Verdana; font-size: smaller; cursor:hand;" ONMOUSEOVER="folder_mouseover(this);" ONMOUSEOUT="folder_mouseout(this);" ONCLICK="folder_click(this);"><tr><a href="javascript:filter_onchange(&quot;7&quot;)"><td><img src="..\Filter\folder0.gif">&nbsp;</td><td>7</td></a></tr>


                        </table></td><tr><td></td><td>


                        <table border="0" cellspacing="0" padding="2" Title="Show Mobiles from this Category Only" style="display: none; font-family: Verdana; font-size: smaller; cursor:hand;" ONMOUSEOVER="folder_mouseover(this);" ONMOUSEOUT="folder_mouseout(this);" ONCLICK="folder_click(this);"><tr><a href="javascript:filter_onchange(&quot;8&quot;)"><td><img src="..\Filter\folder0.gif">&nbsp;</td><td>8</td></a>


                        </tr></table></td></table>


                        <table border="0" cellspacing="0" cellpadding="0" Title="Click to Display/Hide Categories" style="font-family: Verdana; font-size: smaller; cursor:hand;"  ONCLICK="group_click(this);"><tr><td><img src="..\Filter\expand0.gif"></td><td><img src="..\Filter\alert.gif">&nbsp;xxx</td></tr><tr><td></td><td>


                        <table border="0" cellspacing="0" padding="2" Title="Show Mobiles from this Category Only" style="display: none; font-family: Verdana; font-size: smaller;
                        cursor:hand;" ONMOUSEOVER="folder_mouseover(this);" ONMOUSEOUT="folder_mouseout(this);" ONCLICK="folder_click(this);"><tr><a href="javascript:filter_onchange(&quot;9&quot;)"><td><img src="..\Filter\folder0.gif">&nbsp;</td><td>9</td></a></tr>

                        </table></td><tr><td></td><td>


                        <table border="0" cellspacing="0" padding="2" Title="Show Mobiles from this Category Only" style="display: none; font-family: Verdana; font-size: smaller; cursor:hand;" ONMOUSEOVER="folder_mouseover(this);" ONMOUSEOUT="folder_mouseout(this);" ONCLICK="folder_click(this);"><tr><a href="javascript:filter_onchange(&quot;10&quot;)"><td><img src="..\Filter\folder0.gif">&nbsp;</td><td>10</td></a></tr>


                        </table></td><tr><td></td><td>


                        <table border="0" cellspacing="0" padding="2" Title="Show Mobiles from this Category Only" style="display: none; font-family: Verdana; font-size: smaller; cursor:hand;" ONMOUSEOVER="folder_mouseover(this);" ONMOUSEOUT="folder_mouseout(this);" ONCLICK="folder_click(this);"><tr><a href="javascript:filter_onchange(&quot;11&quot;)"><td><img src="..\Filter\folder0.gif">&nbsp;</td><td>11</td></a></tr>

                        </table></td><tr><td></td><td>


                        <table border="0" cellspacing="0" padding="2" Title="Show Mobiles from this Category Only" style="display: none; font-family: Verdana; font-size: smaller; cursor:hand;" ONMOUSEOVER="folder_mouseover(this);" ONMOUSEOUT="folder_mouseout(this);" ONCLICK="folder_click(this);"><tr><a href="javascript:filter_onchange(&quot;12&quot;)"><td><img src="..\Filter\folder0.gif">&nbsp;</td><td>12</td></a></tr>


                        </table></td><tr><td></td><td>


                        <table border="0" cellspacing="0" padding="2" Title="Show Mobiles from this Category Only" style="display: none; font-family: Verdana; font-size: smaller; cursor:hand;" ONMOUSEOVER="folder_mouseover(this);" ONMOUSEOUT="folder_mouseout(this);" ONCLICK="folder_click(this);"><tr><a href="javascript:filter_onchange(&quot;13&quot;)"><td><img src="..\Filter\folder0.gif">&nbsp;</td><td>13</td></a></tr>


                        </table></td><tr><td></td><td>


                        <table border="0" cellspacing="0" padding="2" Title="Show Mobiles from this Category Only" style="display: none; font-family: Verdana; font-size: smaller; cursor:hand;" ONMOUSEOVER="folder_mouseover(this);" ONMOUSEOUT="folder_mouseout(this);" ONCLICK="folder_click(this);"><tr><a href="javascript:filter_onchange(&quot;14&quot;)"><td><img src="..\Filter\folder0.gif">&nbsp;</td><td>14</td></a></tr>

                        </table></td></table>

</body>
</html>

================

u want to add tree values dynamicaly, mail to me..
raj_selvam@hotmail.com

i expecting good points

raj_selvam
0
 
LVL 2

Author Comment

by:dabellei
ID: 6383956
Can you send it to me by email please so I can try it.


daniel_belleisle@hotmail.com

Thanks
0
 
LVL 1

Expert Comment

by:raj_selvam
ID: 6387081
sure
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question