Showing posts with label cal. Show all posts
Showing posts with label cal. Show all posts

Saturday, March 24, 2012

Watermark and popup cal inside update panel

Hi David Anson, want to know if the problem for watermark and popup cal have been sloved.
Thanks.

Not sure I know what issue you mean, but maybe the following blog posting helps?

http://blogs.msdn.com/delay/archive/2006/08/15/701848.aspx


Thanks, David. I try the code with AtlasControlToolkit-1064. It reports error
object does not support the property or method

the code for this error is:
$object("TextBoxWatermarkBehavior_TextBox1").set_text(favoriteColor);.

I try the apporach for my case as with textbox and popup calendar.
Code:
<script>
function commitScript() {
var mydate = $("TextBox1").mydate;
if("" == favoriteColor) {
favoriteColor = "";
}
$object("TextBoxWatermarkBehavior_TextBox1").set_text(mydate);
}
</script
<asp:Panel ID="Panel1" runat="server" CssClass="popupControl">
<atlas:UpdatePanel ID="UpdatePanel1" runat="server" Mode="Conditional" RenderMode="Inline">
<ContentTemplate>
<center>
<asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#999999"
CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
ForeColor="Black" Width="160px" OnSelectionChanged="Calendar1_SelectionChanged">
<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectorStyle BackColor="#CCCCCC" />
<WeekendDayStyle BackColor="#FFFFCC" />
<OtherMonthDayStyle ForeColor="#808080" />
<NextPrevStyle VerticalAlign="Bottom" />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
<TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
</asp:Calendar>
</center>
<atlasToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server">
<atlasToolkit:PopupControlProperties TargetControlID="txtBatchDateTextBox" PopupControlID="Panel1"
Position="Bottom" ID="PopControlBehavior1" CommitProperty ="batchDate" CommitScript ="commitScript()"/>
</atlasToolkit:PopupControlExtender>
</ContentTemplate>
</atlas:UpdatePanel>
</asp:Panel
<atlasToolkit:TextBoxWatermarkProperties ID="TextBoxWatermarkBehavior" TargetControlID="TextBox1"
WatermarkText="<DD/MM/YYYY>" WatermarkCssClass="watermarked" /
<asp:TextBox ID="TextBox1" runat="server" CssClass="TextBox" Width="152px"></asp:TextBox></td
The I got error:
Object Required

The code for this error is:
var mydate = $("TextBox1").mydate;

So questtions are:
Where to get the 60731 release of the Toolkit?
Only this release support custom expando property for targetControlID?
Sorry, the code is:

<script>
function commitScript() {
var mydate = $("TextBox1").mydate;
if("" == mydate) {
mydate = "";
}
$object("TextBoxWatermarkBehavior_TextBox1").set_text(mydate);
}
</script
<asp:Panel ID="Panel1" runat="server" CssClass="popupControl">
<atlas:UpdatePanel ID="UpdatePanel1" runat="server" Mode="Conditional" RenderMode="Inline">
<ContentTemplate>
<center>
<asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#999999"
CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
ForeColor="Black" Width="160px" OnSelectionChanged="Calendar1_SelectionChanged">
<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectorStyle BackColor="#CCCCCC" />
<WeekendDayStyle BackColor="#FFFFCC" />
<OtherMonthDayStyle ForeColor="#808080" />
<NextPrevStyle VerticalAlign="Bottom" />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
<TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
</asp:Calendar>
</center>
<atlasToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server">
<atlasToolkit:PopupControlPropertiesTargetControlID="txtBatchDateTextBox" PopupControlID="Panel1"
Position="Bottom" ID="PopControlBehavior1" CommitProperty ="mydate"CommitScript ="commitScript()"/>
</atlasToolkit:PopupControlExtender>
</ContentTemplate>
</atlas:UpdatePanel>
</asp:Panel
<atlasToolkit:TextBoxWatermarkProperties ID="TextBoxWatermarkBehavior" TargetControlID="TextBox1"
WatermarkText="<DD/MM/YYYY>" WatermarkCssClass="watermarked" /
<asp:TextBox ID="TextBox1" runat="server" CssClass="TextBox" Width="152px"></asp:TextBox></td>
As I note in the blog post, the example is forToolkit release 60731.
Hi David, Thanks for your message. I download the release 60731 and try it for watermark and popcalendar, it is greate okay. But I have another prblem.

In my page, I use many other atlas toolkit controls. It works fine when I use AtlasControlToolkit-1064. But with the release 60731, it cause a lot of assertion errors. The following code cause assertion errors for ConfirmButton and errorMessage user control.

Any new release include 67031 and 1064 fixes?

<%@. Register src="http://pics.10026.com/?src=errormessage.ascx" TagName="errormessage" TagPrefix="uc2" %>
...
<atlasToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server">
<atlasToolkit:ConfirmButtonProperties TargetControlID="btnDelete" ConfirmText="Are you sure you want to delete?" />
</atlasToolkit:ConfirmButtonExtender>
<uc2:errormessage ID="ErrorMessage1" runat="server" />
More info about ConfirmButton:

For the ConfirmButton, its target control is a button. This button is visible or invisible dynamically. When It is invoisible, then there is a assertion error.
This visible attirbute is set in asp code.

With release 1064, it's okay. With release 60731, it report assertion error.

<atlasToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server">
<atlasToolkit:ConfirmButtonProperties TargetControlID="btnDelete"ConfirmText="Are you sure you want to delete?" />
</atlasToolkit:ConfirmButtonExtender>

Please post a simple page demonstrating the assertion you hit. Thanks!