Hide/Show Controls - Forum - Mobile - Progress Community

Hide/Show Controls

 Forum

Hide/Show Controls

This question is answered

Im trying to make a select control vissible when the value of another select control is changed. i have tried everything and i am having no luck with it, could you put me on the right path? I am using progress version 11.3.1 and I am using javascript to show and hide the control.

this is one of the ways i have tried:

var type = Appery("cboType");
var Btype = Appery("cboBadgeType");
            
if(type.value == "13") {
 Btype.style.visibility = "visible";
} else {
 Btype.style.visibility = "hidden";
}

Verified Answer
  • Thanks for all the help. This was what i used to get the code to work:

    if (Appery('cboType').val() == '13') {

    Appery('cboBadgeType').parent().show();

    } else {

    Appery('cboBadgeType').parent().hide();

    }

All Replies
  • Hi meyrick,

    Try the following code:

    var type = Appery("cboType");
    var Btype = Appery("cboBadgeType");
    if(type.value == "13") {
    Btype.parent().show();
    } else {
    Btype.parent().hide();
    }

    The syntax I usually use to hide/show a select is the following:

    Appery('mobileselect').parent().hide();

    Please let us know if it worked.

    Regards,

    Ricardo

  • Hi Ricardo

    Thanks for your response but unfortunately it has not worked for me. The control is still staying hidden. Do you have any other suggestions? its also not hitting that condition for some reason.

    Regards,

    Meyrick

  • Hi meyrick,

    try this:

    var type = Appery("cboType");

    var Btype = Appery("cboBadgeType");

    if(type.val() == "13") {

       Btype.show();

    } else {

        Btype.hide();

    }

    "parent()" no need in this case

  • Hi Meyrick,

    Please send an email to rperdiga@progress.com (with the email you use to access OE Mobile) and I will share a sample I've created with this working.  

    Another option, if you share your project with my email (rperdiga@progress.com) and tell me the page, I will take a look why your code is not working (you can remove the share after I am done).

    Please let me know,

    Ricardo Perdigao

    rperdiga@progress.com

  • Thanks for all the help. This was what i used to get the code to work:

    if (Appery('cboType').val() == '13') {

    Appery('cboBadgeType').parent().show();

    } else {

    Appery('cboBadgeType').parent().hide();

    }

  • Be careful using the IDs. They change J
    Better to use meaningful names for the control you are interested in and use the function that uses the control name.
     
    Thanks
    -Shelley
     
    From: meyrick [mailto:bounce-meyrick@community.progress.com]
    Sent: Thursday, February 06, 2014 1:53 AM
    To: TU.Mobile@community.progress.com
    Subject: RE: Hide/Show Controls
     
    Reply by meyrick

    Thanks for all the help. This was what i used to get the code to work:

    if (Appery('cboType').val() == '13') {

    Appery('cboBadgeType').parent().show();

    } else {

    Appery('cboBadgeType').parent().hide();

    }

    Stop receiving emails on this subject.

    Flag this post as spam/abuse.