yes, I maade rebdered to be "true" and onclick attribute of radiobutton works
instead of onselect for some reason.
Thanks Bruno and Volker.
Quoting Volker Weber <[EMAIL PROTECTED]>:
> Hi,
>
> you can't invoke click() on a button which is not rendered!
>
> you have rendered="false" in your button. The javascript can't find the
> element. there must be an javascript error in your client.
>
> regards
> Volker
>
> [EMAIL PROTECTED] wrote:
> > Hi ,
> >
> > I am using javascript as suggested by Bruno for invoking an action when I
> > choose/click on a radiobutton. My problem is that the javascritp is not
> called
> > at all.
> > Here's my code. Can anyone find any error in my code.
> >
> > <script language="javascript">
> >
> > function showFilesList() {
> >
> >
> > document.getElementById("whereForm:displayFiles").click();
> >
> > }
> >
> >
> > </script>
> > <body>
> >
> > <h:selectOneRadio id="showFilesOption" value="0" onclick="showFileList()"
> > layout="pageDirection" style ="font-family: Arial, sans-serif;
> color:grey;">
> > <f:selectItem
> > itemValue="0" itemLabel="Entire collection"/>
> > <f:selectItem
> > itemValue="1" itemLabel="Files in
> collection"/>
> > </h:selectOneRadio>
> > <h:selectManyListbox
> > id="filesListbox" style="width: 300"
> > rendered="false">
> > <f:selectItems
> > id="filesListItems"
> > value="#{MyLeadTreePublish.items}"/>
> > </h:selectManyListbox>
> > <h:commandButton id="displayFiles" value="View Files >>>"
> > actionListener="#{MyLeadTreePublish.DisplayFiles}" rendered="false"/>
> >
> >
> > </body>
> >
> >
> > I dont think the function showFileList() is not called at all I guess. Any
> ideas.
> >
> > Thanks
> >
>
> --
> Don't answer to From: address!
> Mail to this account are droped if not recieved via mailinglist.
> To contact me direct create the mail address by
> concatenating my forename to my senders domain.
>