|
Rank: Newbie Groups: Member
Joined: 6/26/2007 Posts: 3
|
Hi,
I am having the following problem with the calendar pop up: I have asp ajax update panel and the calendar pop up in it. The calendar has its AutoPostBackOnSelect = true and an event on the server side. When this event triggers, asp.net ajax update panel doesnt update, and the following javascript error is returned: Sys.ArgumentNullException: Value cannot be null. Parameter name: postBackElement.
Where does the problem lies?
Best Regards,
Ivan Zlatanov.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Ivan,
We tried it at here and it works fine. Would you mind to provide a sample app for us that demonstrates the problem? Also let us know the version of our controls and the version of ASP.NET AJAX that you use.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 6/26/2007 Posts: 3
|
Hi,
I found the problem. This error occurs when I am using the asp.net ajax toolkit as well as the asp:updatepanel. Try the following code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %> <!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" > <head id="Head1" runat="server"> <title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript"> function ChangeDateDepart() { //Format the callback date prefix
var cell = document.getElementById("DateDepart"); //Show the popup calendar eo_ShowPopupCalendar("tpDateDepart", cell); }
</script> </head> <body leftmargin="0" topmargin="0"> <form id="form1" runat="server">
<asp:ScriptManager ID="testess" runat="server" ></asp:ScriptManager>
<asp:UpdatePanel ID="update" runat="server"> <ContentTemplate> <asp:TextBox ID="TextBox1" runat="Server"></asp:TextBox> <span id="DateDepart" runat="server"></span> <input type="button" value="..." style="width: 30px;" onclick="javascript:ChangeDateDepart()"/> <eo:PopupCalendar Visible="true" Enabled="true" AutoPostbackOnSelect="true" ID="tpDateDepart" runat="server" ControlSkinID="None" DayCellHeight="16" DayCellWidth="19" DayHeaderFormat="FirstLetter" DisabledDates="" OtherMonthDayVisible="True" SelectedDates="" TitleLeftArrowImageUrl="DefaultSubMenuIconRTL" TitleRightArrowImageUrl="DefaultSubMenuIcon" VisibleDate="2007-06-01"> <DayHeaderStyle CssText="border-bottom: #aca899 1px solid" /> <DisabledDayStyle CssText="color: gray; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" /> <SelectedDayStyle CssText="background-color: #fbe694; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" /> <DayStyle CssText="border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" /> <TitleArrowStyle CssText="cursor:hand" /> <MonthStyle CssText="font-size: 12px; margin-left: 14px; cursor: hand; margin-right: 14px; font-family: tahoma" /> <CalendarStyle CssText="background-color: white; border-right: #7f9db9 1px solid; padding-right: 4px; border-top: #7f9db9 1px solid; padding-left: 4px; font-size: 9px; padding-bottom: 4px; border-left: #7f9db9 1px solid; padding-top: 4px; border-bottom: #7f9db9 1px solid; font-family: tahoma" /> <DayHoverStyle CssText="border-right: #fbe694 1px solid; border-top: #fbe694 1px solid; border-left: #fbe694 1px solid; border-bottom: #fbe694 1px solid" /> <TodayStyle CssText="border-right: #bb5503 1px solid; border-top: #bb5503 1px solid; border-left: #bb5503 1px solid; border-bottom: #bb5503 1px solid" /> <OtherMonthDayStyle CssText="color: gray; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" /> <TitleStyle CssText="background-color:#9ebef5;font-family:Tahoma;font-size:12px;padding-bottom:2px;padding-left:6px;padding-right:6px;padding-top:2px;" /> </eo:PopupCalendar> <ajaxToolkit:TextBoxWatermarkExtender WatermarkCssClass="Required" ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="TextBox1" WatermarkText=" "> </ajaxToolkit:TextBoxWatermarkExtender> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="tpDateDepart" EventName="SelectionChanged" /> </Triggers> </asp:UpdatePanel> </form> </body> </html>
Can you help me how to solve this please.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Ivan,
Please check the version of the controls that you use. We tried your code with our latest version and we do not see any problem.
We did have to remove ajaxToolkit:TextBoxWatermarkExtender when we try it because we do not have that control. So please make sure:
1. You are running the latest version, the latest is 2007.1.20; 2. You remove ajaxToolkit:TextBoxWatermarkExtender;
And see if you still get the same error.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 6/26/2007 Posts: 3
|
HI,
Yes. Here also when remove the watermark everything works perfectly. I think its a problem with asp.net ajax control not posting back correctly, not yours. I am using your latest versions - ajax latest as well. I have removed the extender and now it works perfectly. I guess I will be waiting for newer asp.net ajax control toolkit versions. Thanks for your time.
Best Regards,
Ivan Zlatanov.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Ivan,
Thanks for the update. Please feel free to let us know if you see any other issues.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 3/14/2008 Posts: 5
|
I'm having what appears to be a similar problem that occurs with IE but not Firefox. Has this happened with anyone else?
I have a page on which I do an eo_Callback. That works fine. However, in IE but not Firefox, when I later navigate away from the page, I get the 'argument cannot be null exception' from this framework routine.
var $removeHandler = Sys.UI.DomEvent.removeHandler = function Sys$UI$DomEvent$removeHandler(element, eventName, handler) { /// <param name="element" domElement="true"></param> /// <param name="eventName" type="String"></param> /// <param name="handler" type="Function"></param> var e = Function._validateParams(arguments, [ {name: "element", domElement: true}, {name: "eventName", type: String}, {name: "handler", type: Function} ]); if (e) throw e;
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Please create a test page that reproduces the problem and we will be happy to take a look.
Thanks!
|
|