Ok, I'm totally stumped and could really use some help on this one.
I'm trying to create an AJAX enabled search form similar in function to kayak.com (left side search options trigger a new search url which in turn causes the right side search results to be filtered). Of course, I'd like to do all of this without a big ugly page refresh. The kicker is that I've got it working in IE, but not FireFox. Usually I find that IE is the browser that gives me the most trouble so I'm a little surpised to find that its now Firefox.
I've broken the page down as far as I can and have left only the offending code. The problem occurs when ever I have a checkbox within another AJAX Extender control. In this example, its in a CollapsiblePanelExtender (I've also reproduced it in a TabExtender as well). Here's what I've got: a checkbox (chk1) in a PanelExtender with Autopostback="true". The code behind simply, updates the URL by adding the parameter "checked=[ ]". On Page Load, it checkes the value in the query string, and sets the value of the checkbox. Pretty simple.
But for some reason it works in IE 7 but not FF2. Firefox does a full screen reload while IE does a nice subtle AJAX update. Any help would be much appreciated!!!!!
Thanks!!!!
Here's the code:
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="ctlNavStatic.ascx.vb" Inherits="YourCompany.Modules.Rentals.ctlNavStatic" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Panel ID="TitlePanel1" runat="server" CssClass="collapsePanelHeader">
<asp:Image ID="cpeImage1" runat="server" ImageUrl="images/expand_blue.jpg" />
<asp:Label ID="Title1" runat="server">Group 1</asp:Label>
</asp:Panel>
<asp:Panel ID="ContentPanel1" runat="server" CssClass="collapsePanel">
<asp:Panel ID="pnl1" runat="server">
<asp:CheckBox ID="chk1" runat="server" Checked="False" Text="CheckBox1" CssClass="checkbox"
AutoPostBack="true" OnCheckedChanged="AttributeChanged" />
</asp:Panel>
</asp:Panel>
<cc1:CollapsiblePanelExtender ID="cpe1" runat="Server" TargetControlID="ContentPanel1"
ExpandControlID="TitlePanel1" CollapseControlID="TitlePanel1" Collapsed="False"
TextLabelID="Title1" ExpandedText="Group 1" CollapsedText="Group 1" ImageControlID="cpeImage1"
ExpandedImage="images/collapse_blue.jpg" CollapsedImage="images/expand_blue.jpg"
SuppressPostBack="false">
</cc1:CollapsiblePanelExtender>
Imports DotNetNuke
Imports DotNetNuke.Entities.Modules
Namespace YourCompany.Modules.Rentals
Partial Class ctlNavStatic
Inherits PortalModuleBase
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
If Not Request.QueryString("checked") Is Nothing Then
Dim chk As CheckBox = CType(Me.FindControl("chk1"), CheckBox)
If Not chk Is Nothing Then
If Request.QueryString("checked") = "True" Then
chk.Checked = True
Else
chk.Checked = False
End If
End If
End If
End If
End Sub
Public Sub AttributeChanged(ByVal sender As Object, ByVal e As System.EventArgs)
Response.Redirect(NavigateURL(Me.TabId, "", "checked=" + sender.Checked.ToString), True)
End Sub
End Class
End Namespace