Re: [jQuery] attr() not working in IE anymore?

2006-08-08 Thread Sam Collett
On 08/08/06, Klaus Hartl [EMAIL PROTECTED] wrote:

  To create non-text input elements in IE you have to use the following:
 
  document.createElement(input type=submit);

 In contrast to this: You cannot create button elements with
 document.createElement in IE, but have to use innerHTML for that...

 see here:

 http://stilbuero.de/demo/create_button_bug/dom.html (createElement, does
 not work in IE)

 http://stilbuero.de/demo/create_button_bug/inner.html (innerHTML, works
 in IE)


 Never ending story...


 -- Klaus


Actually, this works:

var button = document.createElement('input');
button.type = 'submit';
button.value = 'The button';
document.getElementById('test').appendChild(button);

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] attr() not working in IE anymore?

2006-08-08 Thread Klaus Hartl

 Actually, this works:
 
 var button = document.createElement('input');
 button.type = 'submit';
 button.value = 'The button';
 document.getElementById('test').appendChild(button);

yes, sure, it isn't a button element.

button elements can take html as children, span for example which allows 
for some advanced styling. and they even look the same in safari...


-- Klaus



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/