Help for: TreeView-Control instead of Menu-Control

Topics: Developer Forum, User Forum
Oct 18, 2009 at 1:33 PM
Edited Oct 18, 2009 at 1:34 PM

Hi,

I wanna change the default menu-control for the navigation to a simple treeView-control.

I just replaced the menu-control with the TreeView-Control and attached the existing MenuSourceData to the TreeView-Control.

<asp:TreeView runat="server" DataSourceID="menuDataSource" ID="myTree" />
<asp:SiteMapDataSource runat="server" ID="menuDataSource" ShowStartingNode="false" />


All works great.
The TreeView is populated and looks fine.

In IE it works all great.

But, in Firefox it does not work.
It just populates the TreeView-Control, but when I want collapse a node, a
javascript error occures.

I dont understand it.
I saw that the javascript-method call on the node is not correctly rendered out.
But I dont know why!!!??

Can anybody help me??

Thanks
Oliver Waterkamp

Oct 19, 2009 at 12:30 AM
What is the exact Javascript error?

Which js is not rendered? Exactly how does it look?

Did you just change the theme? If so, can you upload your theme to the
Patches section so others can have a look?

What version of IE and FF?

IE is very forgiving, especially for dotnet code and controls. FF is
better at following standards.

In general, if it looks OK in FF then will look OK in IE-- but not the
other way around.



>
Oct 19, 2009 at 7:39 AM

Hi,
Thanks for your fast answer.
I now that about FF and IE already what you say ;-))

OK, after a long search yesterday I find it out finally.
The Problem was the ClientTarget-Property on the Page-Directive.

When you use a simple TreeView-Control within the Skin-File and call any
Page that use that Theme AND the called Page has the ClientTarget-Property set
within Page-Directive you will receive an Javascript Error.

The Error appears only in my Firefox (3.5.3), when you click on the +/- image to expand or collapse the node.
But the tree is fine populated.

IE works fine.

After I replaced the ClientTarget-Property it works also in my FF Browser.

Regards,
Oliver

Oct 19, 2009 at 1:58 PM

Oliver --

Regarding this...

>>>I replaced the ClientTarget-Property it works also in my FF

...can you post that here so I can use it too?

Oct 19, 2009 at 2:41 PM
Edited Oct 19, 2009 at 2:41 PM

 

Hi again,
  
Sorry, I mean not 'replaced'...
I just removed the ClientTarget-Property. And till now, all seems still to work fine...

Hope this help.
Otherwise let me know, if I can help you.

By the way.
When you are involved in this project, I could say the project is
very cool.
It saves me a lot of time and I can implement very easy my customized modules :-))

great job!
 
Oliver Waterkamp