views:

614

answers:

3

I am running the ASP .NET AJAX Toolkit 3.5.

I have setup a panel with a collapsablePanelExtender and it works in Firefox 3.5 but not in IE7! In IE7 all the "collapsed" panels never shrink - activating the button does nothing.

My code:

<asp:ImageButton ID="btnA" runat="server" ImageUrl="~/Image/expand.gif"  />
<asp:Panel ID="pnlA" runat="server" >
<!-- grid -->
     <asp:GridView ID="gridA" runat="server" 
          AllowPaging="True" AllowSorting="True"
          DataSourceID="sdsA" GridLines="Vertical">
      </asp:GridView>
</asp:Panel>
<cc1:CollapsiblePanelExtender ID="cpeA" runat="server"
     Enabled="True" TargetControlID="pnlA" 
     CollapsedSize="0" ExpandedSize="300" Collapsed="true" ScrollContents="true"
     ExpandControlID="btnA" CollapseControlID="btnA"
     ExpandDirection="Vertical" ExpandedImage="~/Image/collapse.gif"           
     CollapsedImage="~/Image/expand.gif"
     ImageControlID="btnA" AutoExpand="false" SuppressPostBack="true">
 </cc1:CollapsiblePanelExtender>

Is there something wrong with the code?

The DOCTYPE I have been using is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

I also tried:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" >

UPDATE1:

It looks as though clicking on the button resulting in the panel 'hiding' for a brief moment before it re-appears.

A: 

I just checked the code in IE8, Firefox and Chrome and it seems to be working with all of them. Just check it out on IE8, and let me know if it works.

Either IE7 settings, or the browser itself is at fault. Code is just fine.

Rahul Soni
Probably something that the IS department has done with network settings in relation to IE7...oh well.
John M
A: 

I'll provide an additional answer in case anyone else encounters this:

A possible alternative is to use the accordion control. This works well in IE7.

John M
+1  A: 

I have the same problem with IE 7 and collapsablePanelExtender;

it works with Safari, Chrome but not with IE 7.

ArnIan