0

I have some problem: I have Rad Combo Box that calls User Types and once I populate all the info I want to create JS function everytime the user click on something else in the Rad Combo Box it will pop up some message I know that I need to use The OnSelectedIndexChange event but maybe I'm using it on the wrong way please help me

This is my Code: JS

  function OnSelectedIndexChange(sender,args) {
    var retValRCB = false
    var l_UserType = $find("<%=rcbUserType.ClientID %>");
    var l_UserTypeInd = l_UserType.get_selectedIndex();

    if (!(l_UserTypeInd == null))
        retValRCB = true;
    else {
        alert("Please select rule type");
        retValRCB = false;
    }
    return retValRCB;
 }

This is My Code in Asp:

User Type: ID="rcbUserType" OnClientSelectedIndexChanged="OnSelectedIndexChange" EmptyMessage="Select User Type" runat="server">

1 Answer 1

1
function OnSelectedIndexChange(sender, args) {
    var l_UserType = $find("ctl00_MainContent_rcbUserType");
    var l_UserTypeInd = l_UserType.get_selectedIndex();

    if (!(l_UserTypeInd == null)){
        alert((l_UserTypeInd+1)+" has been selected");
        }
 }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.