TAGS :Viewed: 8 - Published at: a few seconds ago

[ <select> multiple="multiple" not working in Firefox ]

This problem appears only in Firefox (I'm using the latest version 26.0), it works fine in IE and Chrome. <select> tag is not showing the values, but it works fine if I select any of the blanks, so I guess the problem is in presentation somewhere. I tried adding size attribute like suggested here, but it didn't work.

&lt;select multiple="multiple" name="activity.teachers" &gt;
    &lt;c:forEach var="theTeacher" items="${teacherList}"&gt;
        &lt;option value="${theTeacher.teacherId}" label="${theTeacher.title.titleDescription} ${theTeacher.firstName} ${theTeacher.lastName}" /&gt;

It looks like this in Firefox:

enter image description here

And it's suppose to look like this (IE/Chrome):

enter image description here


Update: This is HTML page

&lt;select multiple="multiple" name="activity.teachers" &gt;
    &lt;option value="1" label="PhD Tom Hale" /&gt;       
    &lt;option value="2" label="MSc Jane Briggs" /&gt;
    &lt;option value="3" label="PhD Steve McClintock" /&gt;

Answer 1

The label attribute is not supported in FF. Change it to this:

<option value="${theTeacher.teacherId}">${theTeacher.title.titleDescription} ${theTeacher.firstName} ${theTeacher.lastName}</option>

Unfixed bug for this issue open since 2000

Answer 2

I've got a problem also that i've got specified "size=1" and in Chrome it works just fine. But in Firefox it in one line select box.. Simple change it to size="5" and it works.