Home - Forums-.NET - FlyTreeView (ASP.NET) - NavigateTarget="_blank" does not work in Firefox

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

NavigateTarget="_blank" does not work in Firefox
Link Posted: 26-Mar-2009 08:35
I am binding flytreeview control to a dataset and use the NavigateURLField and NavigateTarget="_blank" to open the link in a new window. This works if I use IE but does not work with Firefox.

Any help to resolve would be appreciated.

Thanks
Link Posted: 26-Mar-2009 09:34
Didn't manage to reproduce.

Added a node to stock demo:
    NavigateUrl="http://www.google.com/" NavigateTarget="_blank">


Checked in IE7 and FireFox 3.
IE opens in a new window, FF opens it in a new tab. Isn't it a desired behavior?
Link Posted: 26-Mar-2009 09:49
I am using the following code:

                                         BorderColor="Silver" BorderWidth="1px" Height="100%" Width="100%" Padding="1px" ImageSet="Vista"
                        FadeEffect="True" WideCell="True" ExpandLevel="1" NavigateTarget="_blank"  CanBeSelected="false" ContentClickCollapses="true">
                        
                        
                        
                        
                            
                            

                        
                  

I want to open the link in a new window / tab doesn't matter. but works only with IE. I am using Firefox 3.0.7
Link Posted: 26-Mar-2009 10:10
Also could you help me to open a link to word or excel file in their respective application without opening a blank windows which at present is the issue with IE;  it opens both a new window and the word/excel application.

It works with Firefox when I remove the NavigateTarget property and it opens in the same browser window. I want users to see the link in a new window

Thanks.
Link Posted: 26-Mar-2009 23:51
You can put custome javascript code using
NavigateUrl="javascript:openInANewWindowOrWhatever(...)"

Then you can simply use javascript's window.open(...) function to manage where what and how you need to display (same window, or new, etc.)
Link Posted: 26-Mar-2009 23:56
[quote="samdsilva"]I am using the following code:

                                         BorderColor="Silver" BorderWidth="1px" Height="100%" Width="100%" Padding="1px" ImageSet="Vista"
                        FadeEffect="True" WideCell="True" ExpandLevel="1" NavigateTarget="_blank"  CanBeSelected="false" ContentClickCollapses="true">
                        
                        
                        
                        
                            
                            

                        
                  

I want to open the link in a new window / tab doesn't matter. but works only with IE. I am using Firefox 3.0.7

Ok, I modified my code to use FlyNodeBinding and set NavigateTarget property in FlyTreeView (not FlyTreeNode).
Same effect. It opens in a new tab (for Firefox).
If you remove NavigateUrlField and add NavigateUrl="http://www.asp.net/" instead for testing purpose. Does it work then?

Also, do you experience same problem if you add nodes manually instead of databinding? We need to reproduce it somehow to see what the problem is. So any code that we can run and debug here is preferable. Thanks.
Link Posted: 27-Mar-2009 12:12
I tried NavigateURL instead of NavigateURLField but won't work without taking out the NavigateTarget property.

I tried your other suggestion and changed NavigateURL in the NodeDataBound event :

e.Node.NavigateUrl = "javascript:openInNewWindow('" + e.Node.NavigateUrl + "');"
and used the javascript function openInNewWindow to open the target in a new window.

This work for me. Appreciate all your help.

Thanks.
Link Posted: 27-Mar-2009 23:28
It would be great if we also find out why NavigateTarget approach does not work in your case (to fix a possible bug).
Can you help me with reproducing your issue?
Link Posted: 30-Mar-2009 04:00
I'll try to fill the tree manually and using the NavigateTarget property. Will keep you posted.