I thought that was only the case for adding TR elements.  I suppose it likely applies to adding TD elements, but he’s trying to add an INPUT inside a TD.  I’ve never had need to add TBODY tags in that case.

 

Make sure the ‘cloneNode’ function is supported by IE.  I’ve never used it myself, so I have no idea if it is.

 

Another possibility is naming your function ‘onblur’.  IE has a lot more reserved words than Firefox.  For example, you can’t do something like this in IE:
var myObj = { class: ‘blah’ };

 

because ‘class’ is a reserved word in IE.  Works great in Firefox, though.  Not sure if ‘onblur’ is the same or not, but it’s worth looking into.


Also, check into ‘setAttribute’.  IE may not work with that either, or maybe just in certain circumstances.  An alternative to your setAttribute calls:

 

m.id = ‘XYZ_2’;
m.value = ‘’;

Event.observe(m, ‘blur’, function () { alert(‘hola’); } );

 

Good luck.

 

Greg

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Whitcraft, Jon
Sent: Thursday, April 06, 2006 10:48 AM
To: rails-spinoffs@lists.rubyonrails.org
Subject: RE: [Rails-spinoffs] problem with IE

 

Make sure you have tbody tags wrapping your rows or it wont work in IE.

 

Jon Whitcraft
Indianapolis Motor Speedway
[EMAIL PROTECTED]

Phone: (317) 492-8623 :: Fax: (317) 492-6419

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Francisco Calderon
Sent: Thursday, April 06, 2006 11:03 AM
To: rails-spinoffs@lists.rubyonrails.org
Subject: [Rails-spinoffs] problem with IE

 

hello there, im having a little problem with Internet Exploiter, im doing this:

//// CODE ////
    var m = $('XYZ').cloneNode(false)
    m.setAttribute('id', 'XYZ_2');
    m.value = '';
    var >     m.setAttribute('onblur',  onblur);
    y6.appendChild(m);
//// CODE ////

where "XYZ" is an input text and y6 is a TD cell, this works perfectly in firefox, but i dont have idea why doesnt work in IE, any clue??

thx in advance :)

--
//
//   Ing. Francisco J. Calderón S.
//   [EMAIL PROTECTED]
//   Usuario de GNU/Linux  nº 349529
//   Maracay, Venezuela
//

********************

********************

This E-mail (and attachments) may contain confidential/privileged information intended only for the named addressee(s). If you are not an intended recipient, do not read, copy, disseminate or take any action based on the content of this E-mail. Please notify the sender by reply E-mail and erase this E-mail from your system. Your assistance is appreciated. E-mail transmission may not be secure or error-free. The company is not responsible for any loss/damage arising from any virus transmitted.

********************

********************

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to