Hi,
I'm trying to create a button that would make a subform invisible when clicked and visible once it's clicked again. I usually use radio buttons to accomplish this under the change function (see below) BUT this time I want to use a button.
Thank you very much for your help!!!!
if (this.rawValue == "1") {
InvoiceBilling.presence = "visible";
InternalBilling.presence = "hidden";
}
else {
InvoiceBilling.presence = "hidden";
InternalBilling.presence = "visible";
}
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Buttons don't have value, so the if statement will fail.
Instead test against the presence of one of the objects. For example JavaScript in the click event of the button:
if (InvoiceBilling.presence == "hidden") {
InvoiceBilling.presence = "visible";
InternalBilling.presence = "hidden";
}
else {
InvoiceBilling.presence = "hidden";
InternalBilling.presence = "visible";
}
Hope that helps,
Niall
Views
Replies
Total Likes
Hi,
Buttons don't have value, so the if statement will fail.
Instead test against the presence of one of the objects. For example JavaScript in the click event of the button:
if (InvoiceBilling.presence == "hidden") {
InvoiceBilling.presence = "visible";
InternalBilling.presence = "hidden";
}
else {
InvoiceBilling.presence = "hidden";
InternalBilling.presence = "visible";
}
Hope that helps,
Niall
Views
Replies
Total Likes