This is a migrated thread and some comments may be shown as answers.

Treeview node ClientNodeClicking

2 Answers 93 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Michael Finch
Top achievements
Rank 1
Michael Finch asked on 27 Aug 2008, 04:00 PM
Hi

I am attempting to add some client-side code to open a new window when a node which has it's nagivateUrl is clicked and this is what I have so far.
       function ClientNodeClicking(sender, eventArgs)  
        { 
            var node = eventArgs.get_node();   
            if (node.get_navigateUrl())
            {
                    window.open(node.get_navigateUrl());
            }
        } 

Although this does open a new window it caused the parent window to redirect with the [object] error. How can I open a new window or redirect the exsisting window to the navigateURL on a node click?


2 Answers, 1 is accepted

Sort by
0
Michael Finch
Top achievements
Rank 1
answered on 28 Aug 2008, 10:42 AM
Hi

Please ignore this post as I have found a way around the problem I was encountering.

Thanks
0
Veselin Vasilev
Telerik team
answered on 28 Aug 2008, 03:20 PM
Hi Michael Finch,

window.location.href = node.get_navigateUrl();

should be the correct code.

Sincerely yours,
Veskoni
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
TreeView
Asked by
Michael Finch
Top achievements
Rank 1
Answers by
Michael Finch
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or