You need to sign in to do that
Don't have an account?
QuickDEV
Accessing <apex:outputPanel> "id" in JavaScript function
Hi,
I have <apex:outputPanel id="hide" layout="block">.
Html radio buttons with onclick events. Javascript function to handle the above events.
My question is: I am trying to hide the the content present in <apex:outputPanel> [ which results in <div>]
I am not sure how to access the id of the outputpanel and hide/show when the radio buttons are clicked.
I tried something like : $Component.blockID.tableID
. [Link] , but did not succeed.
Any help or direction on this highly appreciated.
Thanks
Use this sample ,Here i am using action support ,you can use action function also.
// Controller
public class sampleSel {
String changeValue = null;
public List getItems() {
List options = new List();
options.add(new SelectOption('View','View'));
options.add(new SelectOption('Hide','Hide'));
return options;
}
public String getChangeValue() {
return changeValue;
}
public void setChangeValue(String changeValue) {
this.changeValue = changeValue;
}
}
//Page
You have selected view
You have selected Hide
Regards
Thanga
Here Page
I am trying the sample code
I get error at the following code:
Error: Compile Error: expecting a left angle bracket, found 'getItems' at line 3 column 16
public List getItems() { List options = new List();
Can you please share working controller?