How about
$('#orderlineform #productlisting').load('orderProxy.cfm',
{
mode:'getAvailableProducts',
ordergrade_id:ordergrade_id,
order_id:order_id
},
function(){
$(this).find('#product_id').change
(isRentalActive);
});
On Mar 11, 11:19 am, Todd Rafferty <[email protected]> wrote:
> I have a drop down that is being generated via load() - to be 100%
> clear, I'll restate that. The drop down does not exist on the actual
> page. I'm doing this:
>
> $('#orderlineform #productlisting').load('orderProxy.cfm',
> {
> mode:'getAvailableProducts'
> ,ordergrade_id:ordergrade_id
> ,order_id:order_id
> }
> );
>
> This is generating the drop down for me and putting it inside the
> #produclisting span for me. Now, just attaching a 'change' event on it
> wasn't working, so I looked into livequery() (eventually live() ) --
> using it works just fine in FireFox, but fails in IE.
>
> $('#orderlineform #product_id').live('change',isRentalActive);
> -----
> function isRentalActive(){
> var data = $("#orderlineform #product_id option:selected").metadata
> ({type:'attr',name:'data'});
> alert(data);
> return false;
> if(data.return_flag == 0){
> $('.rental').css("display", "table-row-group").show();
> }else{
> $('.rental').hide();
> }
>
> }
>
> Any suggestions as to why this is failing in IE?
>
> Thanks,
> ~Todd