<asp:RadioButtonList id="rblType" runat="server"
style="z-index: 103; left: 465px; position: absolute; top: 120px;
width: 150px; height: 16px; vertical-align: middle;"
RepeatDirection="Horizontal" AutoPostBack="false"
onmousedown
="getCheckedRadio()"
OnSelectedIndexChanged="rblType_SelectedIndexChanged">
<asp:ListItem Text="St" Value="St" Selected="True"></asp:ListItem>
<asp:ListItem Text="TC" Value="TC"></asp:ListItem>
</asp:RadioButtonList>
now i want to change the text of textbox using the selected lsititem in radiobuttonlist using javascript.
function getCheckedRadio()
{
var rblType= document.getElementsByName("ctl00_messagePanelsContent_contentPlaceHolder_fvAllotmentDetail_rblType");
//some loop here on rblType and then
for(int i=0; i < rblType.length; i++ )
{
if (rblType.item[i] == "checked")
{
alert("You checked ");
}
}
}
but the above javascript code is not working.
could anyone please help me to how to get the selected listitem using javascript.
thanks in advance...
waiting for reply.
protected
void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
{
Label lblStatus = (Label)e.Container.FindControl("lblStatus");
if (lblStatus.Text == "U")
{
e.Appointment.BackColor = System.Drawing.
Color.Yellow;
}
else if (lblStatus.Text == "A")
{
e.Appointment.BackColor = System.Drawing.
Color.Blue;
}
else if (lblStatus.Text == "P")
{
e.Appointment.BackColor = System.Drawing.
Color.Green;
}
//checkbox1.Checked = true;
}
<
telerik:RadScheduler AllowInsert="false" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" OnAppointmentCreated="RadScheduler1_AppointmentCreated"
runat="server" ID="RadScheduler1" Skin="Office2007" Height="551px" CustomAttributeNames="AppointmentStatus"
Width="690px" ShowFooter="false" SelectedDate="2010-03-18" DayStartTime="07:00:00"
DayEndTime="21:00:00" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" EnableDescriptionField="true"
ShowNavigationPane="false" OnAppointmentDelete="RadScheduler1_AppointmentDelete"
DataSubjectField="1" DataStartField="1" DataEndField="1" ShowAllDayRow="false"
OnClientAppointmentContextMenuItemClicked="A" OnClientAppointmentClick="ShowExisting1"
OnTimeSlotContextMenuItemClicked="RadScheduler1_TimeSlotContextMenuItemClicked" AllowDelete="false"
OnAppointmentContextMenuItemClicked="RadScheduler1_AppointmentContextMenuItemClicked"
onnavigationcommand="RadScheduler1_NavigationCommand">
<AppointmentContextMenuSettings EnableDefault="false" />
<TimelineView UserSelectable="false" />
<AppointmentTemplate>
<%
# Eval("Subject")%>
<asp:Label ID="lblStatus" runat="server" Text=<%#Eval("AppointmentStatus") %>></asp:Label>
</AppointmentTemplate>
<
TimeSlotContextMenuSettings EnableDefault="False" />
</telerik:RadScheduler>
| <asp:ScriptManager runat="server" ID="ScriptManagerMain" /> |
| <telerik:RadAjaxManager ID="RadAjaxManagerMain" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="CustomPanelMenu"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadAjaxLoadingPanelMain"></telerik:AjaxUpdatedControl> |
| <telerik:AjaxUpdatedControl ControlID="CustomPanelMain" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="CustomPanelMain"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadAjaxLoadingPanelMain"/> |
| <telerik:AjaxUpdatedControl ControlID="CustomPanelMenu" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <asp:Panel ID="CustomPanelMenu" runat="server"> |
| <WebParts:TestMenu001 runat="server" ID="TestMenu001_1" Title="MenuSx" __MarkupType="vsattributemarkup" __WebPartId="{0ce525f0-089d-4f57-902a-78d4b87b34b9}" WebPart="true" __designer:IsClosed="false" /> |
| </asp:Panel> |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanelMain" runat="server"/> |
| <asp:Panel ID="CustomPanelMain" runat="server"> |
| <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server"> |
| </asp:ContentPlaceHolder> |
| </asp:Panel> |
