I am having troubling figuring this out. I have a form that accepts information about a user - I am using a radInputManger to validate and all of this works fine. However, if the user wants to enter a "Joint" applicant - they can by selecting the application type from the form. When they do this - an entire new panel is displayed with additional fields. I am then using a different inputmanager for these controls and I want to enable it or disable it when appropriate.
This code does not error - but does not make the CoAppInputManager active either. How can I do this?
Input Managers:
Javascript:
So is there a way to enable and disable the radinput manager client-side, or will i have to do a post-back? I really don't want to have to do that...
This code does not error - but does not make the CoAppInputManager active either. How can I do this?
Input Managers:
<telerik:RadInputManager ID="RadInputManager1" runat="server" Skin="Windows7"> |
<telerik:TextBoxSetting ErrorMessage="Required!"> |
<TargetControls> |
<telerik:TargetInput ControlID="txt_FirstName" /> |
<telerik:TargetInput ControlID="txt_LastName" /> |
<telerik:TargetInput ControlID="txt_Address" /> |
<telerik:TargetInput ControlID="txt_City" /> |
<telerik:TargetInput ControlID="txt_Employer" /> |
<telerik:TargetInput ControlID="txt_Occupation" /> |
</TargetControls> |
<Validation IsRequired="True" ValidationGroup="LoanApplication"></Validation> |
</telerik:TextBoxSetting> |
</telerik:RadInputManager> |
<telerik:RadInputManager ID="radCoAppInputManager" runat="server" Skin="Windows7"> |
<telerik:TextBoxSetting ErrorMessage="Required!"> |
<TargetControls> |
<telerik:TargetInput ControlID="txt_CoFirstName" /> |
<telerik:TargetInput ControlID="txt_CoLastName" /> |
<telerik:TargetInput ControlID="txt_CoOccupation" /> |
<telerik:TargetInput ControlID="txt_CoEmployer" /> |
<telerik:TargetInput ControlID="txt_CoAddress" /> |
<telerik:TargetInput ControlID="txt_CoCity" /> |
</TargetControls> |
<Validation IsRequired="True" ValidationGroup="LoanApplication"></Validation> |
</telerik:TextBoxSetting> |
</telerik:RadInputManager> |
Javascript:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
<script language="javascript" type="text/javascript"> |
<!-- |
function ToggleAppType(sender, eventArgs) { |
var item = eventArgs.get_item(); |
var im_AppType = $find("<%= radCoAppInputManager.ClientID %>"); |
if (item.get_value() == "Joint") { |
document.getElementById("Co-Applicant").style.display = "block"; |
im_AppType.enabled = true; |
// document.getElementById("radCoAppInputManager").visible = true; |
} |
else { |
document.getElementById("Co-Applicant").style.display = "none"; |
im_AppType.visible = false; |
// document.getElementById("radCoAppInputManager").visible = false; |
} |
} |
</script> |
</telerik:RadCodeBlock> |
So is there a way to enable and disable the radinput manager client-side, or will i have to do a post-back? I really don't want to have to do that...