Page view counter

TreeView in IE works doesn't work in FireFox

Last post 10-10-2008 12:25 AM by maduranga001. 12 replies.

Sort Posts:

  • TreeView in IE works doesn't work in FireFox

    11-02-2005, 9:25 PM
    I have a treeview that works great in IE, but it doesnt work in FireFox. It gives an extra space and a link to a __doPostBack function. Here is the source code from each:

    from FireFox:

     <tr class="FreeText">
      <td id="_tdManagersTree" align="left" colspan="4">
         <div class="SubHeadingBackground" id="_tvManagers" class="SubHeadingBackground">
         <table CELLSPACING="0" CELLPADDING="0" BORDER="0">
              <TR>
                  <TD valign='middle'>&nbsp;
                      <a href="javascript:__doPostBack('_tvManagers','oncollapse,0')">
                         <IMG align='top' border='0' class='icon' SRC='/webctrl_client/1_0/treeimages/Rminus.gif'>
                      </a>
                      <a href="javascript:__doPostBack('_tvManagers','oncollapse,0')">
                         <font COLOR="#000000" FACE="Arial" SIZE="2" style="display:inline;font-size:10pt;font-face:Times;text-                           decoration:none;cursor:hand;overflow:hidden;color:black;background-color:#CFCFCF;filter:none;font-                           family:Arial;">&nbsp;Main Managers
                         </font>
                        </a>
                      </TD>
                   </TR>
                   <TR>
                      <TD valign='middle'>&nbsp;
                         
    <IMG align='top' border='0' width='19px' height='1px' SRC='/webctrl_client/1_0/treeimages/white.gif'>
                         <IMG align='top' border='0' class='icon' SRC='/webctrl_client/1_0/treeimages/T.gif'>
                         <a href="javascript:__doPostBack('_tvManagers','onselectedindexchange,0,0.0')">
                         <font FACE="Arial" SIZE="2" style="display:inline;font-size:10pt;font-face:Times;text-                        decoration:none;cursor:hand;overflow:hidden;color:none;background-color:none;filter:none;font-                        family:Arial;">&nbsp;
                         
    <td>
                            <table width=90% border=0>
                               <tr>
                                  <td width=42% style=font-family:Arial style=font-size:13>
                                     <a href=" JavaScript:OpenNewWindow( 'AddManager.aspx?GroupID=83&UserID=1088&StartDate=11/7/2005' );">BOB
                                      </a>
                                   </td>
                                   <td width=20% style=font-family:Arial style=font-size:13>11/7/2005
                                   </td>
                                   <td style=font-family:Arial style=font-size:13></td>
                                 </tr>
                              </table>
                            </td>
                          </font>
                         </a>
                       </TD>
                     </TR>
                     <TR>
                       <TD valign='middle'>&nbsp;
                         
    <IMG align='top' border='0' width='19px' height='1px' SRC='/webctrl_client/1_0/treeimages/white.gif'>
                         <IMG align='top' border='0' class='icon' SRC='/webctrl_client/1_0/treeimages/L.gif'>
                         <a href="javascript:__doPostBack('_tvManagers','onselectedindexchange,0,0.1')">
                         <font FACE="Arial" SIZE="2"  style="display:inline;font-size:10pt;font-face:Times;text decoration:none;cursor:hand;overflow:hidden;color:none;background-color:none;filter:none;font-family:Arial;">&nbsp;
                       
    <td>
                   </div>
                </td>
              </tr>



    From IE:
    <tr class="FreeText">
        <td id="_tdManagersTree" align="left" colspan="4"><?XML:NAMESPACE PREFIX=TVNS />
          <?IMPORT NAMESPACE=TVNS IMPLEMENTATION="/webctrl_client/1_0/treeview.htc" />
          <tvns:treeview id="_tvManagers" class="SubHeadingBackground" defaultStyle="color:none;background-color:none;filter:none;font-family:Arial;" hoverStyle="text-decoration:underline;color:black;background-color:transparent;filter:none;font-family:Arial;" selectedStyle="color:black;background-color:#CFCFCF;filter:none;font-family:Arial;" selectedNodeIndex="0" HelperID="___tvManagers_State__" systemImagesPath="/webctrl_client/1_0/treeimages/" selectExpands="true" autoSelect="true" onexpand="javascript: if (this.clickedNodeIndex != null) this.queueEvent('onexpand', this.clickedNodeIndex)" oncollapse="javascript: if (this.clickedNodeIndex != null) this.queueEvent('oncollapse', this.clickedNodeIndex)" oncheck="javascript: if (this.clickedNodeIndex != null) this.queueEvent('oncheck', this.clickedNodeIndex)" onselectedindexchange="javascript: if (event.oldTreeNodeIndex != event.newTreeNodeIndex) this.queueEvent('onselectedindexchange', event.oldTreeNodeIndex + ',' + event.newTreeNodeIndex)">
         <tvns:treenode Selected="true" ID="_tnMainManagersRoot">
          Main Managers
         <tvns:treenode>
           <td>
             <table width=90% border=0>
               <tr>
                 <td width=42% style=font-family:Arial style=font-size:13>
                    <a href= "JavaScript:OpenNewWindow( 'AddManager.aspx?GroupID=83&UserID=1088&StartDate=11/7/2005' );">BOB
                    </a>
                  </td>
                  <td width=20% style=font-family:Arial style=font-size:13>11/7/2005
                  </td>
                  <td style=font-family:Arial style=font-size:13>
                  </td>
                </tr>
              </table>
            </td>
          </tvns:treenode>
        </tvns:treenode>
      </tvns:treeview>
    </td>
    </tr>


    Why do they look so different? What am I missing?

    Any help would be greatly appreciated.

    Thanks,
    Shane
  • Re: TreeView in IE works doesn't work in FireFox

    11-03-2005, 2:35 PM
    • Loading...
    • Marnee
    • Joined on 06-17-2005, 8:38 PM
    • Tucson
    • Posts 76
    • Points 368
    The source code _doPostBack is not a problem.

    I have a treeview that works fine in Firefox. Especially considering that the Treeview is designed specifically for IE.

    What exactly is wrong with the treeview? It will likely render (look) somewhat differently in Firefox and Opera but should function reasonably.

    A is A
  • Re: TreeView in IE works doesn't work in FireFox

    11-04-2005, 11:22 AM
    I agree the _doPostBack is not necessarily a problem, and the tree functions, but it does look differently, the font is bigger and not lined up like in IE, I moved on in the project because it does work, I just want to make it look the same. Does your tree look the same in IE and FireFox or just work correctly in both?
  • Re: TreeView in IE works doesn't work in FireFox

    11-04-2005, 1:44 PM
    • Loading...
    • Marnee
    • Joined on 06-17-2005, 8:38 PM
    • Tucson
    • Posts 76
    • Points 368
    Yes it does but I had to create a very explicit style for the tree. Its really just a matter of working the style for the tree so that it renders exactly the way you like.

    Also I think the default in Firefox is to underline links. Firefox will treat the nodes in the tree as links. You can turn off the underline feature in the options for Firefox.

    Here is an example of my treeview style:

    DefaultStyle="text-decoration:none;color:white;font-family:Arial;font-size:smaller;"

    SelectedStyle="color:white;background-color:#3399FF;"
    A is A
  • Re: TreeView in IE works doesn't work in FireFox

    11-04-2005, 1:52 PM
    • Loading...
    • Marnee
    • Joined on 06-17-2005, 8:38 PM
    • Tucson
    • Posts 76
    • Points 368
    Oh and dont forget that you can define the styles for both the Tree itself AND as an attribute for each node (ie as an attribute in the XML).

    FOR EXAMPLE:

    treenode Text="NODE1" Type="NODE" NodeData="DATA" Expandable="Always" DefaultStyle="font-weight:bold;color:white;font-family:arial;"
    A is A
  • Re: TreeView in IE works doesn't work in FireFox

    02-05-2006, 7:28 PM
    • Loading...
    • ujjaval
    • Joined on 12-13-2005, 6:22 AM
    • Posts 73
    • Points 251
    My TreeView does not work in Firefox properly. When I click on the parent node in firefox, it creates the duplicate parent node and entire child node structure below the actual tree. And it keeps creating as I am clicking on the parent node. Has anyone faced this situation?? Can someone just post their TreeView example which works in both??

    Thanks,
    Ujjaval
  • Re: TreeView in IE works doesn't work in FireFox

    06-09-2007, 2:27 PM
    • Loading...
    • marloutor
    • Joined on 06-09-2007, 6:17 PM
    • Posts 1
    • Points 2

    I had a similar problem where my treeview looked fine in IE but oddly indented in Firefox.  I found that I had to change two settings (attributes) of the treeview in order to make it line up correctly. 

    The two settings were: NodeIndent="0" ShowExpandCollapse="False"

    In my .aspx file I wrote it this way:
    <asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource15" NodeIndent="0" ShowExpandCollapse="False">
        <NodeStyle Font-Bold="True" />
        <ParentNodeStyle Font-Names="Verdana" Font-Size="18px" />
        <LeafNodeStyle ForeColor="#3685BE" Font-Overline="False" Font-Bold="True" />
        <HoverNodeStyle Font-Bold="True" BackColor="CornflowerBlue" ForeColor="White" />
        <SelectedNodeStyle Font-Bold="True" />
        <RootNodeStyle Font-Bold="True" />
    </asp:TreeView>

     Hope that helps.

    Filed under:
  • Re: TreeView in IE works doesn't work in FireFox

    08-21-2007, 7:12 AM
    • Loading...
    • rennywenny
    • Joined on 08-21-2007, 11:07 AM
    • Posts 2
    • Points 4

    Hi,

    I need your help, i am facing the same problem events of IE Web control Treeview in FIREFOX are making server side calls rather than invoking client side delegates. Please I need your help how can we ward off this problem. Thanks.

     

    Renny Wenny 

    Filed under:
  • Re: TreeView in IE works doesn't work in FireFox

    08-22-2007, 7:44 AM
    • Loading...
    • rennywenny
    • Joined on 08-21-2007, 11:07 AM
    • Posts 2
    • Points 4

    IE Webcontrol Treeview is working fine in IE but in FireFox, events are server side plus there are errors when used in firefox. Please provide the right solution. 

  • Re: TreeView in IE works doesn't work in FireFox

    10-09-2008, 4:11 AM
    • Loading...
    • maduranga001
    • Joined on 08-18-2008, 12:32 AM
    • Posts 144
    • Points 55

     I have the solution.I have posted it to

    http://forums.asp.net/t/1329895.aspx

    tnx.


  • Re: TreeView in IE works doesn't work in FireFox

    10-09-2008, 4:12 AM
    • Loading...
    • maduranga001
    • Joined on 08-18-2008, 12:32 AM
    • Posts 144
    • Points 55

     I have the solution. I posted it to http://forums.asp.net/t/1329895.aspx

    tnx.

  • Re: TreeView in IE works doesn't work in FireFox

    10-09-2008, 4:12 AM
    • Loading...
    • maduranga001
    • Joined on 08-18-2008, 12:32 AM
    • Posts 144
    • Points 55

     my solution

    http://forums.asp.net/t/1329895.aspx

    tnx.

  • Re: TreeView in IE works doesn't work in FireFox

    10-10-2008, 12:25 AM
    • Loading...
    • maduranga001
    • Joined on 08-18-2008, 12:32 AM
    • Posts 144
    • Points 55

     solution

             <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:Label ID="Message" runat="server" AssociatedControlID="LinksTreeView" />
                    <asp:Timer ID="Timer1" runat="server" Interval="1000">
                    </asp:Timer>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
                </Triggers>
            </asp:UpdatePanel>

Page 1 of 1 (13 items)