[mochikit] IE6 problem with OPTION

2007-05-17 Thread Paul

So I'm trying to create a page that will populate a collection of
SELECT's using some AJAX requests. The AJAX part goes fine and I get
data back from the server, it's just when I'm trying to create new
options that I'm running into problems with IE6

For example:

dataTarget = getElement('id_mySel') //This is just a generic SELECT
dataTarget.options[dataTarget.options.length] = OPTION({'value' : 1},
'Some text');

On Firefox that code works perfectly fine, but with IE6 it fails with
Object doesn't support property or method
replacing OPTION with new Option('Some text', 1) works perfectly
fine. Bug (in IE)?

This happens with Mochikit checked out from SVN @ rev 1292
IE 6.0.2900.2180.xpsp_sp2_gdr.070227-2254
WinXP Pro SP2

Regards,
Paul


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
MochiKit group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~--~~~~--~~--~--~---



[mochikit] Re: IE6 problem with OPTION

2007-05-17 Thread Bob Ippolito

On 5/17/07, Paul [EMAIL PROTECTED] wrote:

 So I'm trying to create a page that will populate a collection of
 SELECT's using some AJAX requests. The AJAX part goes fine and I get
 data back from the server, it's just when I'm trying to create new
 options that I'm running into problems with IE6

 For example:

 dataTarget = getElement('id_mySel') //This is just a generic SELECT
 dataTarget.options[dataTarget.options.length] = OPTION({'value' : 1},
 'Some text');

 On Firefox that code works perfectly fine, but with IE6 it fails with
 Object doesn't support property or method
 replacing OPTION with new Option('Some text', 1) works perfectly
 fine. Bug (in IE)?

 This happens with Mochikit checked out from SVN @ rev 1292
 IE 6.0.2900.2180.xpsp_sp2_gdr.070227-2254
 WinXP Pro SP2

Have you tried using DOM functions instead? Something like this:
appendChildNodes(id_mySel, OPTION({value: 1}, some text));

-bob

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
MochiKit group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~--~~~~--~~--~--~---