I don't do this with client side, I do it with server side and a database, but I think you should try one of the following:
1) <label for="type" class="dialog first">Select Type</label> <select id="type" class="dialog first"> <option selected="selected" value="">--- Type ---</option> <script type="text/javascript"> // javascript here to dynamically load content </script> </select> or 2) <label for="type" class="dialog first">Select Type</label> <select id="type" class="dialog first"> //No option to start with </select> javascript: Then make your javascript add the first option. If it is the first in the list then it will be selected by default so there is no need to add selected="selected" Hope this helps, Johnie Karr On Oct 14, 1:57 pm, TimW66 <[EMAIL PROTECTED]> wrote: > Anyone? > > On Oct 13, 6:08 pm, TimW66 <[EMAIL PROTECTED]> wrote: > > > > > I'm seeing some odd behavior in IE with my SELECT boxes. In the > > static HTML, I have the following: > > > <label for="type" class="dialog first">Select Type</label> > > <select id="type" class="dialog first"> > > <option selected value="">--- Type ---</option> > > </select> > > > In JavaScript, I have the following: > > > $.get("create.do", params, > > function(data) { > > if( $('option', idSel).length > 0 ) { > > var firstOption = $('option', idSel); > > $(idSel).replaceWith(data); > > $(idSel).prepend(firstOption); > > $(idSel).removeAttr('disabled'); > > } > > } > > ); > > > The data coming back is actually a snippet of HTML, like this: > > > <select id="type"><option value="1">In</option><option value="2">Out</ > > option></select> > > > Note it does not contain a "selected" attribute. What I want is to > > merge the data with the static HTML so in essence I would have: > > > <label for="type" class="dialog first">Select Type</label> > > <select id="type" class="dialog first"> > > <option selected value="">--- Type ---</option> > > <option value="1">In</option> > > <option value="2">Out</option> > > </select> > > > However, in IE, the "selected" attribute always seems to get set on > > the "In" instead. > > > Is this yet another odd thing with IE? Is there something else I > > should be doing to get the desired results? > > > Thanks in advance.- Hide quoted text - > > - Show quoted text -