views:

192

answers:

2

Hello all,

I am making use of the JQuery fancy box - in this pop up box I have a form with a few select fields and upon changing these slect fields a value in a span element should change. I have got this to work (actually with stackoverflow users help) but the solution doesn't work in IE8...suprise...suprise.

I make changes to the select field but the value does not change. I was wondering if anyone could give me any ideas why this might be the case by just having a look at the following JS code. Does the live function now work in IE8?!!

JS Code:

$('select.htt, select.hst').live('change', function() {
    var channels = parseInt($('#fancy_div select.hst').val(), 10) * parseInt($('#fancy_div select.htt').val(), 10);   
    $('#fancy_div span.yellow2').html(channels + 'Channels');
});

I have pasted the HTML here: http://www.copypastecode.com/13356/ - its a lot of HTML!

Thanks all for any help or guidance why this isn't working on IE. IE doesn't seem to register the changes of the select fields.

+8  A: 

live does not support the change event. From the manual:

Possible event values: click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, keydown, keypress, keyup
Currently not supported: blur, focus, mouseenter, mouseleave, change, submit

karim79
+3  A: 

jQuery live does work in IE8, but the live handlers don't support the change event.

Possible event values: click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, keydown, keypress, keyup

Currently not supported: blur, focus, mouseenter, mouseleave, change, submit

tvanfosson
Ah I see - I did not know this. I guess click will have to do.
Abs