I can confirm this also, using : IE 8.0.6001.*, 128-Bit
As a workaround I used:
var myDiv = new Element('div');
myDiv.addClassName('myCssClass');
On 23 Feb., 11:20, Cyrus <[email protected]> wrote:
> Hi,
>
> I am testing the latest IE8 version and found an error in prototype.
>
> Creating anelementwithnewElementand assigning inline a class, it
> is not working.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
> TR/xhtml11/DTD/xhtml11.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" xml:lang="de">
> <head>
> <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
> <title>Test</title>
> <style type="text/css">
> .red {
> background: red;
> }
> .green {
> background: green;
> }
> }
> </style>
> <script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/
> prototype.js"></script>
> <script src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2/
> scriptaculous.js"></script>
> <script>
> //<![CDATA[
> document.observe("dom:loaded", function() {
> var red =newElement('div', {
> 'id' : 'red'
> }).update('red').addClassName('red');
> $$('body')[0].insert(red);
>
> var green =newElement('div', {
> 'id' : 'green',
> 'class' : 'green'
> }).update('green');
> $$('body')[0].insert(green);
> });
>
> //]]>
> </script>
> </head>
> <body>
> </body>
> </html>
>
> There should be two lines a red and a green one. The green class is
> not taken. Checking the html output with the IE8 dev tool it gets me:
>
> <div id="red" class=".red">red</div>
> <div id="green" className=".green">green</div>
>
> Can someone confirm this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---