Actually this line
$(sourcedropdown).append($('<input type="hidden" id="hid'+leftval
+' />').val(rightval));
is not working in IE.. any alternative?



On Jan 8, 12:46 am, CreativeMind <aftab.pu...@gmail.com> wrote:
> I am using v1.3.2.I can't show the test page because i'm using
> localhost. the generated html of that div is given below.
> ---In IE---
> <DIV class=ws_c7 sizcache="18" sizset="9" nodeIndex="7"
> jQuery1262891096843="258">
> <SELECT id=source0 name=source sizcache="18" sizset="9"
> jQuery1262891096843="259">
> <OPTION>Select One</OPTION><OPTION class=selectedval0 selected
> value=0>Adobe Systems Inc. </OPTION></SELECT> </DIV>
> --- in ff---
> <div class="ws_c7">
>                 <select id="source0" name="source">
>
>                   <option>Select One</option>
>
>                 <option class="selectedval0" value="0">Tech Data
> Corporation </option><input value="31" id="hidCode"
> type="hidden"><input value="3942.72" id="hidValue"
> type="hidden"><input value="C         " id="hidName"
> type="hidden"><input value="0.0" id="hidMarkup" type="hidden"></
> select>
>               </div>
> ----
>
> On Jan 8, 12:19 am, KeeganWatkins <keeganwatk...@gmail.com> wrote:
>
> > at first glance, you may be expecting the :hidden selector to work
> > differently than it actually does:
>
> >http://docs.jquery.com/Selectors/hidden
>
> > the original implementation, before 1.3.2, checked for either
> > display:none or visibility:hidden, whereas the new implementation
> > selects elements "...if it or its parents consumes no space in
> > document. CSS visibility isn't taken into account."
>
> > so, my first question would be, which version of jQuery are you using?
> > anything before 1.3.2 won't even return hidden inputs with the
> > ":hidden" selector.
>
> > can you post a test page?
>
> > On Jan 7, 12:48 pm, CreativeMind <aftab.pu...@gmail.com> wrote:
>
> > > Hi,
> > > I have a dropdown which diplays a companyname with 4 hidden inputs.
> > > these hidden input values are set in text boxes on selected index
> > > change of dropdown.
> > > like this
> > >   var sourcedropdown = $(e.target).parent().parent().children(":nth-
> > > child(7)").children().eq(0);
> > >    $(sourcedropdown).append($('<option></option>').val(val).html
> > > (sourcename).addClass('selectedval'+val));
> > >    var priceval=text[1];
> > >    $.each(priceval,function(leftval,rightval){
>
> > >    $(sourcedropdown).append($('<input type="hidden" id="hid'+leftval
> > > +' />').val(rightval));
>
> > >                             });
>
> > > but when i change the selected value in dropdown, I expect 4 as the
> > > length of inputs, firefox shows 4 in alert but IE shows zero.
>
> > > var sourcedd=$(e.target).parent().parent().children(":nth-child
> > > (7)").children().eq(0);
> > >  $(sourcedd).change(function(){
>
> > >                     var hiddenchildrens=$(this).children
> > > ("input:hidden");
> > >                    alert(hiddenchildrens.length);});
> > > }
>
> > > should i append the hidden inputs in some other way ?
>
> > > thanx,

Reply via email to