Solved

Looknig for an editable treeview

Posted on 2001-08-13
7
387 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 20

Expert Comment

by:jitganguly
ID: 6381406
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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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 300 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Jquery Check against database on select from auto fill not working in all browsers 5 58
Hide cell in a table 2 45
ASP AND XML 3 42
Record locking on classic ASP 3 64
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 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