Hide/Show Controls

Posted by meyrick on 03-Feb-2014 04:52

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";
}

Posted by meyrick on 06-Feb-2014 00:52

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

Posted by Ricardo Perdigao on 03-Feb-2014 09:22

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

Posted by meyrick on 04-Feb-2014 00:01

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

Posted by Valeriy Bashkatov on 04-Feb-2014 02:34

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

Posted by Ricardo Perdigao on 04-Feb-2014 08:12

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

Posted by meyrick on 06-Feb-2014 00:52

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();

}

Posted by Shelley Chase on 08-Sep-2014 10:21

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
 
[collapse]
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.

[/collapse]

This thread is closed