Is your javascript script inside the <head>? If you are using firefox,
you can check with the javascript console if there are errors with the
javascript... BTW, can you check the output HTML to see if the
onchange attribute is rendered somewhere?
Regards,
Bruno
2005/11/6, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> 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
>