Forum Moderators: open

Message Too Old, No Replies

IE7 Select lists - two lists, one won't appear?

         

madmatt69

10:18 pm on Apr 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey all,

I have two select lists:
<select id="info" onChange="getinfo()" />

and

<select id="info2" onChange="getinfo2()" />

When someone selects an option, it dynamically loads content in an iframe. Works no problem.

Except that in IE7, it won't let me show more than one list!

The first list displays correctly, but the second one all the options appear as regular text. It works fine in Firefox though.

If I remove one list and only show the other, that works. But as soon as two lists are on the page, the second always breaks and is displayed as normal text.

Any ideas on this bug?

Fotiman

10:47 pm on Apr 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You didn't really give enough information to help you debug it. Can you post an entire code example (preferably with the minimum code required to reproduce it)?

One thing to note, though... select elements can not be empty. That is, valid select elements must have at least one option element. From your example, you are closing the select element within the opening tag. That's invalid.

madmatt69

10:55 pm on Apr 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<select id="info" onChange="getinfo()" style="font-size:7pt;width:110px;" />
<option title="Select a Country">Select</option>
<option title="tp">Country 1</option>

There's an example with the options. Is it the /> that's messing things up then?

madmatt69

10:56 pm on Apr 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ha it is too!

And here I was thinking it was a bug.

Man I'm slippin' :)

Fixed now, with the proper closing tag.