This content has been marked as final.
Show 2 replies
-
1. Re: h:selectOneMenu, s:selectItems and title
niox.nikospara.yahoo.com Mar 12, 2010 5:16 PM (in response to fmontezuma)Hello,
Try this:
<h:selectOneMenu value="#{a.b.xx}" title="#{a.b.xx}" onchange="this.title = this.options[this.selectedIndex].text">
Could require some tweaking, but that is the general idea.
-
2. Re: h:selectOneMenu, s:selectItems and title
fmontezuma Mar 12, 2010 7:40 PM (in response to fmontezuma)Actually I wanted to set titles for the <option>s of the <select>.
Already found a way, but thanks anyway.
Here is the code, for history:
<script language="text/javascript">
var options = document.getElementsByTagName("option");
for (var optIndex in options)
options[optIndex].title = options[optIndex].text;
</script>