Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • swc 7 posts 27 karma points
    Dec 08, 2011 @ 18:39
    swc
    0

    Custom Tree not rendering JS.

    I have followed the video tutorial on creating a new section, and am trying to get my custom tree to work.  Everything seems to be working correctly, except the RenderJS does not actually appear to be rendering to the page.

    ie, My section comes up fine, and my tree renders its root node and child node correctly.  When I mouse over the child node, I see the call to javascript:openReportNode(1000), which is what I am expecting.  But when I click nothing happens.

    Viewing the page source, I see that the openReportNode(id) function is not present, despite the code below being in my TreeHandler class.  Any ideas what might cause the RenderJS not to be rendered to the page?

    This is in 4.7.1.

     

            public override void RenderJS(ref StringBuilder Javascript)
            {
                // add any javascript functions that the tree will need to call here.  in our case,
                //  we need to add a script that assigns the right frame location when a report node
                //  is clicked...
    
                Javascript.Append(@"
                    function openReportNode(id){
                        parent.right.document.location.href = 'http://www.google.com?q=' + id;
                    }
                ");
            }
Please Sign in or register to post replies

Write your reply to:

Draft