NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
krazycoder
Joined: 04 Feb 2010 Posts: 4
|
Posted: Tue May 25, 2010 7:28 am Post subject: hide/show control in jsf..!!! |
|
|
hello friends..
if this question were asked then plz rediect me ...i have googled lot bt not got the exact what i want to do..
here is what is want to do..
there is one <h:selectoneradio> with two selectitem when i click the first radio button the <h:selectonemenu> should display otherwise hide.
here is ma some of stuff...
| Code: |
<script type="text/javascript">
function showlist(radio,dd)
{
var radio = document.forms[form[form + ":" radio[0]]].checked;
if(radio)
{
document.getElementById(dd).disabled = false;
}
else
if(!radio)
{
document.getElementById(dd).disabled = true;
document.getElementById(dd).disabled = false;
}
}
</script>
<h:selectOneRadio id="rd" value="#{usermb.umaintype}" onclick="showlist(rd,dd)">
<f:selectItem id="ru1" itemLabel="Employee" itemValue="Employee"></f:selectItem>
<f:selectItem id="ru2" itemLabel="Innovator" itemValue="Innovator"></f:selectItem>
</h:selectOneRadio>
<h:selectOneMenu id="dd" value="#{usermb.compName}" disabled="true">
<f:selectItems value="#{usermb.companyList}"></f:selectItems>
</h:selectOneMenu>
|
is thr any property like visible for controls.?!
the above code is not working plz tell me where m going wrong?
thanks in advance.. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|