Hi all,
This is the code that's not working in Safari 4:
<%@ Page Language="C#" AutoEventWireup="true" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <script runat="server" > void ddlPeriodSelection_SelectedIndexChanged(object sender, EventArgs e) { if (ddlPeriodSelection.SelectedValue != "Time_period") { pnlTimePeriodSelection.Visible = false; } else { pnlTimePeriodSelection.Visible = true; } } </script> <head id="Head1" runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <div> How long connection should be available? <asp:DropDownList ID="ddlPeriodSelection" runat="server" onselectedindexchanged="ddlPeriodSelection_SelectedIndexChanged" AutoPostBack=true> <asp:ListItem Value="One_day" Text="Today" /> <asp:ListItem Value="Time_period" Text="Select date" /> </asp:DropDownList> <asp:Panel runat="server" ID="pnlTimePeriodSelection" Visible="false"> Please select exact date: <asp:TextBox runat="server" ID="tbDateFrom" Width="70px" /> <ajaxToolkit:CalendarExtender ID="calendarButtonExtenderFrom" runat="server" TargetControlID="tbDateFrom" /> </asp:Panel> </div> </div> </ContentTemplate> </asp:UpdatePanel> </form> </body> </html>
After the selection of second option it stops refresh updatepanel. Calendar is also not rendered.
Could someone suggest how can i fix it ?
Thanks
------------------------------------
I put the following in a separate .js file:
Sys.Browser.WebKit = {}; //Safari 3 is considered WebKit
if (navigator.userAgent.indexOf('WebKit/') > -1) {
Sys.Browser.agent = Sys.Browser.WebKit;
Sys.Browser.version = parseFloat(navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);
Sys.Browser.name = 'WebKit';
}
I then referenced the script on the masterpage where the control is located:
<script type="text/javascript" language="javascript" src="/Workarea/java/webkit.js"></script>
http://forums.asp.net/t/1413064.aspx
Solution is here http://forums.asp.net/p/1252014/2392110.aspx