Treeview in Javascript

Hi all,
Can anybody send me the code or link for a treeview script written in jvascript....i need to incorporate a tree display and have no time to write my own code for that. so i request plz help me.
Abhinav

you should've been able to search the web and find several scripts in the time you've waited for me to tell you that.

Similar Messages

  • How to dynamically create a treeview in sharepoint using javascript or jquery

    How to dynamically create a treeview in sharepoint using javascript that displays spsites ,spweb,splist

    Hi,
    In SharePoint 2010, we can customize web service and use Server Object Model to get all the SharePoint sites, webs and lists, then call the web service using jQuery and using the jQuery Treeview plugin to display the data.
    The following articles for your reference:
    Walkthrough: Creating a Custom ASP.NET Web Service
    https://msdn.microsoft.com/en-us/library/office/ms464040%28v=office.14%29.aspx?f=255&MSPPError=-2147217396
    Using Jquery to call an ASMX service in sharepoint 2010
    http://stackoverflow.com/questions/9035539/using-jquery-to-call-an-asmx-service-in-sharepoint-2010
    jQuery-ui Treeview
    https://plugins.jquery.com/btechcotree/
    Best Regards,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Report Viewer Javascript error

    I have a good report that works great if I export to pdf.
    objdoc.ExportToDisk (ExportFormatType.PortableDocFormat, "c: \ \ testreport.pdf");
    When I load the CrystalReportViewer
    CrystalReportViewer1.ReportSource = objdoc;
    returns a javascript error:
    TreeWidget_getHTML JScript
    file:
    allinOne.js
    this instruction:
    to for (var D in E) {B [C + +] = E [D]. getHTML (F.initialIndent, D == 0)
    because b[c++] is undefined for some values ...
    The only problem I have when I load the report in the ReportViewer.
    The old crystalreportviewer 10.0.53 works on VS2008 now i like import this aspx on VS2010 but i have this problem.

    Is there any resolution for the above issue?
    I have the similar problem.
    To reproduce the error just add a reference to a js script file in the page head:
    <script src="/Scripts/ClassExtentions.js" type="text/jscript"></script>
    where the Array prototype has an extension like: "Array.prototype.testing = true;"
    on loading the page an error occurs in treeview.js TreeWidget_getHTML() function:
    ..sub[i].getHTML < is undefined (Object doesn't support this property or method) = no getHTML function.
    Verifying function (prototype property) availability is missing from other code parts as the next error is in palette.js PaletteWidget_init function:
    ..item.init() < is undefined = no init function for the runtime object, item..
    tryed this fix (works fine):
    treeview.js line 711
         for (var i in sub)
           if (sub[i].getHTML) a[j++]=sub[i].getHTML(o.initialIndent,i==0)
    best regards, Zsolt

  • Creating a TreeView using an SQL data source

    Hello and how is everyone. I have been coding in Java Windows services and console applications for a couple of years and now I want to start working on some Java Server Pages. I have been reading up on JSP and JSTL. What I want to do is query an SQL database and bring the data into my jsp page and display the data using a TreeView. Can someone help out ? Thanks :)

    If you want a tree component on a web page, you will have to use html/javascript to do that.
    You can't use swing components in an html page.
    Take a look around at javascript tree components (there are several around the net). You then have to write your jsp to generate the correct javascript code to populate that component.
    Obviously it all depends on the javascript component that you decide on to display the tree.
    Hope this helps,
    evnafets

  • Opening file present in treeview by clicking on it within a table? I had created a table with a row and two columns. in one column i had dislayed treeview and want that if i click on the file in treeview it gets opened in other column. Can this happen?

    I also got a code in some website related to my problem but there are errors in this code that i am not able to understand can you correct those errors:
    using System;
    using System.IO;
    using System.Collections;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Web;
    using System.Web.SessionState;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.HtmlControls;
    using Microsoft.Web.UI.WebControls;
    namespace shark.TreeView
    /// <summary>
    /// Summary description for DocTree.
    /// </summary>
    public class DocTree : System.Web.UI.Page
    protected Microsoft.Web.UI.WebControls.TreeView TreeCtrl;
    public DocTree()
    Page.Init += new System.EventHandler(Page_Init);
    private void Page_Load(object sender, System.EventArgs e)
    if ( ! this.IsPostBack )
    // add tree node "type" for folders and files
    string imgurl = "/shark/webctrl_client/1_0/Images/";
    TreeNodeType type;
    type = new TreeNodeType();
    type.Type = "folder";
    type.ImageUrl = imgurl + "folder.gif";
    type.ExpandedImageUrl = imgurl + "folderopen.gif";
    TreeCtrl.TreeNodeTypes.Add( type );
    type = new TreeNodeType();
    type.Type = "file";
    type.ImageUrl = imgurl + "html.gif";
    TreeCtrl.TreeNodeTypes.Add( type );
    // start the recursively load from our application root path
    // (we add the trailing "/" for a little substring trimming below)
    GetFolders( MapPath( "~/./" ), TreeCtrl.Nodes );
    // expand 3 levels of the tree
    TreeCtrl.ExpandLevel = 3;
    private void Page_Init(object sender, EventArgs e)
    InitializeComponent();
    // recursive method to load all folders and files into tree
    private void GetFolders( string path, TreeNodeCollection nodes )
    // add nodes for all directories (folders)
    string[] dirs = Directory.GetDirectories( path );
    foreach( string p in dirs )
    string dp = p.Substring( path.Length );
    if ( dp.StartsWith( "_v" ) )
    continue; // ignore frontpage (Vermeer Technology) folders
    nodes.Add( Node( "", p.Substring( path.Length ), "folder" ) );
    // add nodes for all files in this directory (folder)
    string[] files = Directory.GetFiles( path, "*.aspx" );
    foreach( string p in files )
    nodes.Add( Node( p, p.Substring( path.Length ), "file" ) );
    // add all subdirectories for each directory (recursive)
    for( int i = 0; i < nodes.Count; i++ )
    if ( nodes[ i ].Type == "folder" )
    GetFolders( dirs[ i ] + "\\", nodes[i ].Nodes );
    // create a TreeNode from the specified path, text and type
    private TreeNode Node( string path, string text, string type )
    TreeNode n = new TreeNode();
    n.Type = type;
    n.Text = text;
    if ( type == "file" )
    // strip off the physical application root portion of path
    string nav = "/" + path.Substring( MapPath( "/" ).Length );
    nav.Replace( '\\', '/' );
    n.NavigateUrl = nav;
    // set target if using FRAME/IFRAME
    n.Target="doc";
    return n;
    #region Web Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    this.Load += new System.EventHandler(this.Page_Load);
    #endregion
    and the design that i got on website for the code that i displayed just above it is
    <%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
    <%@ Page language="c#" Codebehind="DocTree.aspx.cs" AutoEventWireup="false" Inherits="shark.TreeView.DocTree" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <HEAD>
    <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
    <meta content="C#" name="CODE_LANGUAGE">
    <meta content="JavaScript (ECMAScript)" name="vs_defaultClientScript">
    <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
    </HEAD>
    <body>
    <form id="DocTree" method="post" runat="server">
    <table height="100%" cellSpacing="0" cellPadding="8" border="0">
    <tr height="100%">
    <td vAlign="top">
    <iewc:treeview id="TreeCtrl" runat="server" SystemImagesPath="/shark/webctrl_client/1_0/treeimages/">
    </iewc:treeview>
    </td>
    <td vAlign="top" width="100%" height="100%">
    Click on any *.aspx page in the tree and it should load here <iframe id="doc" name="doc" frameBorder="yes" width="100%" scrolling="auto" height="100%">
    </iframe>
    </td>
    </tr>
    </table>
    </form>
    </body>
    </HTML>
    This is my code for viewing treeview but it is not expanding plz help me in this also
    using System;
    using System.Collections.Generic;
    using System.Configuration;
    using System.Data;
    using System.IO;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;
    using System.Media;
    using System.Drawing;
    using System.Drawing.Imaging;
    public partial class _Default : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)
    if (Page.IsPostBack == false)
    System.IO.DirectoryInfo RootDir = new System.IO.DirectoryInfo(Server.MapPath("~/Files"));
    // output the directory into a node
    TreeNode RootNode = OutputDirectory(RootDir, null);
    // add the output to the tree
    MyTree.Nodes.Add(RootNode);
    TreeNode OutputDirectory(System.IO.DirectoryInfo directory, TreeNode parentNode)
    // validate param
    if (directory == null) return null;
    // create a node for this directory
    TreeNode DirNode = new TreeNode(directory.Name);
    // get subdirectories of the current directory
    System.IO.DirectoryInfo[] SubDirectories = directory.GetDirectories();
    // OutputDirectory(SubDirectories[0], "Directories");
    // output each subdirectory
    for (int DirectoryCount = 0; DirectoryCount < SubDirectories.Length; DirectoryCount++)
    OutputDirectory(SubDirectories[DirectoryCount], DirNode);
    // output the current directories file
    System.IO.FileInfo[] Files = directory.GetFiles();
    for (int FileCount = 0; FileCount < Files.Length; FileCount++)
    DirNode.ChildNodes.Add(new TreeNode(Files[FileCount].Name));
    } // if the parent node is null, return this node
    // otherwise add this node to the parent and return the parent
    if (parentNode == null)
    return DirNode;
    else
    parentNode.ChildNodes.Add(DirNode);
    return parentNode;
    This is my design
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title></title>
    <style type="text/css">
    .auto-style2
    width: 412px;
    .auto-style3
    width: 174px;
    .auto-style4
    width: 743px;
    .auto-style5
    width: 506px;
    height: 226px;
    </style>
    </head>
    <body>
    <form id="form1" method="post" runat="server">
    <table align:"center" class="auto-style4" border="1" style="table-layout: fixed; border-spacing: 1px">
    <tr>
    <td class="auto-style3">
    <br />
    <br />
    <br />
    <br />
    </td>
    <td class="auto-style2">
    <br />
    <br />
    <br />
    <br />
    </td>
    </tr>
    <tr>
    <td class="auto-style3" valign="top">
    <asp:TreeView Id="MyTree" PathSeparator = "|" ExpandDepth="0" runat="server" ImageSet="Arrows" AutoGenerateDataBindings="False">
    <SelectedNodeStyle Font-Underline="True" HorizontalPadding="0px" VerticalPadding="0px" ForeColor="#5555DD"></SelectedNodeStyle>
    <NodeStyle VerticalPadding="0px" Font-Names="Tahoma" Font-Size="10pt" HorizontalPadding="5px" ForeColor="#000000" NodeSpacing="0px"></NodeStyle>
    <ParentNodeStyle Font-Bold="False" />
    <HoverNodeStyle Font-Underline="True" ForeColor="#5555DD"></HoverNodeStyle>
    </asp:TreeView>
    </td>
    <td class="auto-style2">
    <base target="_blank" /> <iframe frameborder="0" scrolling="yes" marginheight="0" marginwidth="0"
    src="" class="auto-style5"></iframe>
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>

    Hi meghage,
    From your code, it is a WebForm project.
    This forum is to discuss problems of Windows Forms. Your question is not related to the topic of this forum.
    You can consider posting it in asp.net forum for supports . Thanks.
    ASP.NET: http://forums.asp.net
    Regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Portal Eventing JSP TreeView

    I am trying to refactor a piece of code that was originally designed using HTMLB to create a tree view role menu that invokes an event in another iView.
    My question is, can portal eventing be done with traditional  JavaScript as opposed to using HTMLB? We are not using WebDynPro for this project.
    I would like to use a jsp treeview to re-engineer the existing htmlb tree structure, but wanted to get some feedback on the options...thanks

    Hi Ryan,
    > whether or not the eventing
    > has to be done on the server side
    The eventing between iViews is done by EPCF, and this is, as said, a pure JS framework. Often it might be senseful for the iView which gets "informed" by some other iView about some event with some event data, to use this data and to refresh itself. This depends on the concrete use case.
    Having this said, it is obviously totally independent if you usue EPCF from some portal HTMLB-JSP, a "pure" JSP without HTMLB or a BSP - all of these things end up in HTML with the possibility to include JS - the EPCF calls.
    See http://help.sap.com/saphelp_nw04/helpdata/en/82/04b340be3dff5fe10000000a155106/frameset.htm for further details.
    > Can all of this be done without post backs
    > to the server,
    As said before, the eventing through EPCF works on client side, but in many cases it makes sense to refresh some iView with some data sent by the event.
    Imagine a List-Details iView combination. The user has one iView with a list of products and another iView with the details of one product. By choosing one product in the list iView, this iView could raise an event, which is subscribed by the details iView, for example passing some product-ID. Now it would make sense to refresh the details iView with the ID given. The alternative would be to load all details data and only to show up the chosen details and to switch on the event. Two disadvantages: It's much harder to code and you may have a very long transmission/network time for the inital call of this iView.
    > without using htmlb using JSP not BSP
    See above, it's independent from the HTML-Layer.
    > can you store a result set in a client side object,
    > like a cookie, and if so, how?
    For sure, somehow you can (at least some representation). But here I'm unsure again, in which direction this question aims, if this is really helpful.
    Hope it helps
    Detlev

  • Generate & using Javascript in custom Tag

    Hi everyone,
    I'm developing a custom tag to create a treeview from a TreeModel.
    I've got a script found on the web which uses a few javascripts file.
    My question is :
    How do i have to use my javascripts file ?
    Do i have to just import the javascipt files in my project ? (i.e. in a directory called "scripts"). Or do the javascripts have to be only available for my tag.
    Of course, the javascripts for the tag should only be used by the tag.
    So, if anyone can give my what's the best practice.
    Thank's
    Sebastien Degardin

    Javascript runs only on the client.
    So the javascript file needs to be on your web server, and your jsp page needs to import that script using the <script> tag.
    It doesn't necessarily need to be in your java project, as it is not needed at compile time. Consider it a static resource like an image or a .html file.
    Basically your JSP is then just generating javascript code that will run on the client.

  • Treeview showing "weird Anuj" data in Photoshop CC

    I have a huge plugin (more than 15,000 lines of code) working perfectly in CS5 and above. Althought it works on Photoshop CC, I noticed that javascript treeview (usually shows data from an external XML file) are not showing the correct data in CC version (check below the same project seen in different versions):
    This happens all around my several jsx modules. I noticed that it happens in the "subItem[x]" (item.subItems[0].text = sorted[i][1]; ) entries. Any ideas why is it happening and how to fix?

    In some threads was reported about script UI bugs in CC. This affects, among other things Treeview.

  • JavaScript Links & Frames issue

    Hi,
    I have a DHTML Folder Tree, also known as a TreeView. That is, an expandable/collapsible tree of links.
    In a frame-less layout everything works great. In a frame-based layout, it doesn't work on Safari/Konqueror.
    There are two frames: the left frame contains the tree control; when you click on a link in the tree, the right frame is the target for the links in the tree.
    The tree mechanism itself works fine. But there is a problem with the links. What happens on Safari/Konqueror with the frame-based layout is the first link works fine, but all links after that do not. That is, the first click loads a picture on the right frame, but when I click on any other links after that, the target frame is not updated.
    Any ideas/suggestions/help would be much appreciated.
    Cheers,
    FF.

    More information...
    The Web page in question is:
    http://www.treeview.net/tv/demo/demoFrameset.html
    Note that these links are HTML, constructed using JavaScript. Here are interesting/relevant portions of the code:
    // The code that constructs the href for the link:
    linkString = "href=\""this.link"\" target=\""this.target"\" onClick=\"clickOnLink('"this.getID()"\', '"this.link+"','"+this.target"');return false;\"";
    // The clickOnLink function
    clickOnLink(clickedId, target, windowName) {
    highlightObjLink(findObj(clickedId));
    if (isLinked(target)) {
    window.open(target,windowName);

  • JavaScript error when using HoverMenu

    Hi,
    I'm using the HoverMenu with the TreeView in my project. When I call JavaScript methods in my form from the menu I get JavaScript Object Expected errors.
    For test I have made a simple DynPage iView (see code below). When I try to call the script reloadTree() from buttons, links, checkbox etc. everything works just fine. Trying to call the same method in the setClientSideScript of a hover menu item I get a JavaScript error: Object expected.
    I have tried to add the script method as raw text to the form with no luck. If I use the Document.setHeadRawText the script is inserted in the body and not in the header as described in the documentation.
    If I add alert('Some test') directly to the setClientSideScript it works just fine
    The code example is from the doProcessBeforeOutput()
    Document doc = getDocument();
    doc.setHeadRawText("<script>function reloadTree(){alert('Alert inside reloadTree function');}</script>");
    myForm.addRawText("<a href="#" onClick="reloadTree()">Test of reloadTree() from a href...</a>");
    HoverMenu hover = new HoverMenu("HoverMenu");
    hover.setMenuTrigger(com.sapportals.htmlb.enum.HoverMenuTrigger.ONCLICK);
    hover.addMenuItem("TEST1", "Test of reloadTree() from hovermenu...").setClientSideScript("reloadTree()");
    TextView tv = new TextView("click here to test reloadTree()");
    tv.setHoverMenu(hover);
    form.addComponent(tv);
    Button bt_Refresh = new Button("Button_HiddenRefresh");
    bt_Refresh.setText("Test of reloadTree() from button");
    bt_Refresh.setOnClientClick("reloadTree()");
    form.addComponent(bt_Refresh);
    Checkbox cb = new Checkbox("Checkbox");
    cb.setText("Test from checkbox");
    cb.setDisabled(false);
    cb.setChecked(true);
    cb.setOnClientClick("reloadTree()");
    form.addComponent(cb);
    Does anyone know why the HoverMenu item script in setClientSideScript cannot access JavaScript functions in my form ?
    Regards
    Michael

    Hi,
    I'm using the HoverMenu with the TreeView in my project. When I call JavaScript methods in my form from the menu I get JavaScript Object Expected errors.
    For test I have made a simple DynPage iView (see code below). When I try to call the script reloadTree() from buttons, links, checkbox etc. everything works just fine. Trying to call the same method in the setClientSideScript of a hover menu item I get a JavaScript error: Object expected.
    I have tried to add the script method as raw text to the form with no luck. If I use the Document.setHeadRawText the script is inserted in the body and not in the header as described in the documentation.
    If I add alert('Some test') directly to the setClientSideScript it works just fine
    The code example is from the doProcessBeforeOutput()
    Document doc = getDocument();
    doc.setHeadRawText("<script>function reloadTree(){alert('Alert inside reloadTree function');}</script>");
    myForm.addRawText("<a href="#" onClick="reloadTree()">Test of reloadTree() from a href...</a>");
    HoverMenu hover = new HoverMenu("HoverMenu");
    hover.setMenuTrigger(com.sapportals.htmlb.enum.HoverMenuTrigger.ONCLICK);
    hover.addMenuItem("TEST1", "Test of reloadTree() from hovermenu...").setClientSideScript("reloadTree()");
    TextView tv = new TextView("click here to test reloadTree()");
    tv.setHoverMenu(hover);
    form.addComponent(tv);
    Button bt_Refresh = new Button("Button_HiddenRefresh");
    bt_Refresh.setText("Test of reloadTree() from button");
    bt_Refresh.setOnClientClick("reloadTree()");
    form.addComponent(bt_Refresh);
    Checkbox cb = new Checkbox("Checkbox");
    cb.setText("Test from checkbox");
    cb.setDisabled(false);
    cb.setChecked(true);
    cb.setOnClientClick("reloadTree()");
    form.addComponent(cb);
    Does anyone know why the HoverMenu item script in setClientSideScript cannot access JavaScript functions in my form ?
    Regards
    Michael

  • How to hide/unhide the all Treenodes on Treeview based on Checkbox changed event in Sharepoint custom webpart Sitecollections

    How to  hide/unhide the all Treenodes on Treeview based on Checkbox changed event?
    Checkbox(Control)
    1.Checkbox Checked:(Action below like)
     if user click on  Checkbox, all the treenodes on treeview is hide.
    2.Checkbox Unchecked(Action below like)
    If user uncheck the Checkbox  all the treenodes on treeview is unhode.
    Could you please help me how to do above one.
    Badri

    Hi,
    According to your post, my understanding is that you want to hide/show the TreeView when the Checkbox checked/unchecked.
    We can use jQuery to achieve it, the following script for your reference:
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
    $("input[type=checkbox]").click(function () {
    if (this.checked) {
    $("#TreeViewID").hide();
    } else {
    $("#TreeViewID").show();
    </script>
    More information:
    http://dineshsharepoint.blogspot.com/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Tree Sending Data to JavaScript - Help!

    I am trying to call a function in JavaScript and apss a parameter to it. The code I have below is not working. The label I have in HTML always says undefined after I call the ExternalInterface function in my mxml function. Can someone please take a look and tell me what I am doing wrong?
    mxml code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
       width="404" height="356" preinitialize="init()">
      <mx:Script>
        <![CDATA[
          [Bindable]
          public var treeData:Array = new Array();
          public function init():void{
            var tmpObjectGrains:Object = new Object();
        var tmpObjectDairy:Object = new Object();
        var tmpObjectFruits:Object = new Object();
        var tmpObjectMeats:Object = new Object();
        var tmpObjectNuts:Object = new Object();
        tmpObjectGrains['label']="BOC";
        tmpObjectGrains['children']=[{label:'Line 1'},
                                         {label:'Line 2'},
                                         {label:'Line 3'},
                                         {label:'Line 4'}];
        treeData.push(tmpObjectGrains);
        tmpObjectDairy['label']="TOC";
            tmpObjectDairy['children']=[{label:'Line 10'},
                                        {label:'Line 20'},
                                        {label:'Line 30'}];
        treeData.push(tmpObjectDairy);
        tmpObjectFruits['label']="SLOC";
    tmpObjectFruits['children']=[{label:'Line X'},
                                         {label:'Line Y'},
                                         {label:'Line Z'}];
            treeData.push(tmpObjectFruits);   
         public function jsPassData(event:Event):void
         if (ExternalInterface.available)
             ExternalInterface.call("PassData", treeView1.selectedItem);
             lblMessage.text = "Data sent!";
           else
             lblMessage.text = "Error sending data!"
       ]]>
    </mx:Script>
      <mx:Panel id="pnlMain" x="0" y="0" width="404" height="356"
         layout="absolute" title="JavaScript Test">
         <mx:Tree id="treeView1" x="0" y="0" dataProvider="{treeData}" labelField="label" change="jsPassData(event);" width="268" height="219"></mx:Tree>
        <mx:Label x="276" y="22" id="lblMessage"/>
      </mx:Panel>
    </mx:Application>
    JavaScript function:
    <script language="JavaScript" type="text/javascript">
    function PassData(data)
      if(person == null)
        alert("Select a line");
      else
        document.getElementById('TreeView').innerHTML = data.label;
    </script>

    I have tried sending an object or just simple text and still cannot get the data through....
    It seems as though I need to know how to call which item is selected in the tree and how to receive it in JavaScript.

  • ScriptUI Treeview selected values

    hi,
    I'm running on a new Powerbook running OSX 10.6.6, InDesign CS5.
    I have a ScriptUI javascript snippet below that should bring up a treeview object inside a dialog:
    // Start Snippet
    var myTree = w.add ("treeview", [0, 0, 400, 170]);
    myApparel = myTree.add ("node", "Apparel");
    myWomens = myApparel.add ("node", "Womens");
    myWomens.add ("item", "Blouses");
    myWomens.add ("item", "Pants");
    myWomens.add ("item", "Skirts");
    myMens = myApparel.add ("node", "Mens");
    myMens.add ("item", "Shirts");
    myMens.add ("item", "Pants");
    myMens.add ("item", "Suits");
    saveButton = w.add('button', undefined, 'Save');
    saveButton.onClick = function()
        alert('myCategories: ' + myApparel.expanded + ' ' + myApparel.selected +
                '\nmyMens: ' + myMens.expanded + ' ' +myMens.selected +
                '\nmyWomens: ' + myWomens.expanded +  ' '  + myWomens.selected
    // End Snippet.
    The problem I have is with the expected values for the "expanded" values that are coming back.
    If I select Apparel->Womens->Skirts, I expect the myApparel.expanded and myWomens.expanded
    values to come back as 'true'. They do not.  Is this a bug?
    How else can I get the full hierarchy/path of my selection?
    Carlos

    @Peter:
    I have no problem getting the value/index of the selected item.
    What I think is a bug is that the ancestor/parental nodes 'expanded' and 'selected'
    flags of my selected item are not set to true, when clearly they are expanded.
    Anyway, here is my implementation to get all the nodes including my selection:
    // Start Snippet
            var sel = myTree.selection;
            var depth=0;
            var parent = null;
            var nodes = new Array();
            if(sel != null)
                nodes[depth] = sel;
                parent = sel.parent;
            while(parent != null && parent != myTree)
                depth++;
                nodes[depth] = parent;       
                //alert(parent);       
                parent = parent.parent;
    // End Snippet
    I would have liked to have a utility function that returned an array
    of listItems or an array of strings, similar to what I have done above.

  • Flash TreeView menu and user interaction

    Hi,
    I've developed in Javascript a TreeView menu.
    I would like to do the same in Flash/AS but i do not know
    where to start :-(
    before to start i would like to know :
    - if it is possible to make this TreeView menu dynamic ?
    i mean by that that web developer could use this TreeView
    menu by adding
    several nodes and children to this menu like :
    MyFlashMenu.addChild("new node", "parent node", imageNode);
    but i do not know if from web page it is possible to pass
    arguments to
    flash.
    thanks a lot,
    A.

    Sorry, I meant GhostWire, not GhostWriters...
    http://ghostwire.com
    -ML
    "Marc Lee" <[email protected]> wrote in message
    news:fju6kl$97j$[email protected]..
    > I've been using a 3rd-party treeview from GhostWriters.
    That tv would
    allow
    > dynamic updates. We're doing it. I'm not familiar with
    the V2 component
    > treeview (a built-in for Flash 8 and later), but I would
    imagine that
    would
    > allow dynamic updates as well.
    >
    > There is an API to the Flash player that is embedded in
    your webpage that
    > should allow you to pass commands to your tree. I don't
    have the
    > documentation right in front of me but you should be
    able to find it quite
    > easily through googling.
    >
    > Contact me offline if you'd like to discuss more.
    >
    > HTH,
    >
    > Marc Lee
    >
    > "R.A.F." <[email protected]> wrote in message
    > news:fjrrvr$j3s$[email protected]..
    > > Hi,
    > >
    > > I've developed in Javascript a TreeView menu.
    > > I would like to do the same in Flash/AS but i do
    not know where to start
    > :-(
    > >
    > > before to start i would like to know :
    > > - if it is possible to make this TreeView menu
    dynamic ?
    > >
    > > i mean by that that web developer could use this
    TreeView menu by adding
    > > several nodes and children to this menu like :
    > >
    > > MyFlashMenu.addChild("new node", "parent node",
    imageNode);
    > >
    > > but i do not know if from web page it is possible
    to pass arguments to
    > > flash.
    > >
    > > thanks a lot,
    > >
    > > A.
    >
    >

  • Javascript  - is there something like an "active row count" property??

    Lets say I have a tabular form. Every time I use the form, the # of rows returned by the query will vary. Maybe first time I go to the page, the select statement returns only 5 rows, but the next day it returns 25 rows.
    Is there some type of system variable to stores the # of rows visible on the page at a given time within this tabular form?
    I realize that if I have an tabular form item with an id of f03 for example, then on each row it will be referenced as f03_0001, then f03_0002 on the next row and then f03_0003 on the next row etc...
    In pseudocode, here is what I want to do:
    For i = 1 to ACTIVE_ROW_COUNT (assuming this is the # of rows in the HTML table)
    perform some operation on 'f03_000' + ACTIVE_ROW_COUNT
    Do you see what I'm after? I checked the APEX api, but I couldn't find such a property. It seems like you can't do much if you can't figure out this current index # or the max on the page.
    Also, I tried playing around with the "this" keyword in hopes of finding a pointer to the "current item" that would have triggered the onchange event, but no luck either.
    Thanks in advance.

    Hi:
    Within javascript you can reference the columns of the tabular form as
    <script>
    col1 = document.forms0.f01;  // the first updateable column of your report
    alert (col1.length) ;   //  number of rows
    </script>varad
    Edited by: varad acharya on Dec 8, 2008 5:53 PM

Maybe you are looking for

  • T1/E1 redundancy in Route List

    Hi All: Can some one please help me to resolve the issue? I have 2 route groups in a route list for a Dial pattern, but for testing purpose when I shut down one controller , it DOES NOT go automatically to 2nd route group. RL_Toronto --à RG-Tor  ----

  • Does Motion 5 support the Keylight plug-in by Foundry?

    I'm trying to decide whether to upgrade my old and now unseable copy of AE or just make the jump over to Motion. I need to do some rather reasonably high-end chroma key and like the idea of being able to bring the footage into Motion and doing it the

  • Convert lwp files to word?

    I've got some old lotus wordpro files I want to open with my mac. Tried it a while back and there was a free program on the net that would do it on a pc but not a mac. any suggestions?

  • Why won't firefox connect to the internet when IE will?

    Mozilla stopped working about a week ago without my knowledge of any updates or anything like that. Internet Explorer still works fine and will connect but when I try to use Firefox it tells me 'unable to connect.' I have already removed Firefox and

  • Retaining Spell errors mark

    Hello All, Please anyone advise me to retain the Spell check error marks (zigzag red underlines) in the exported PDF from InDesign. Thanks, Praveen