class and super are reserved words that we actually never use, but
think of them as words like _if_ or _case_

Use className as the appropriate property for setting the HTML
attribute of class, a bit hoaky but that is just the way it is, with
or w/o prototype...

http://www.webreference.com/javascript/reference/core_ref/keywords.html

---

http://positionabsolute.net



On Apr 20, 7:29 am, butz <adrian.chris...@halbehalbe.ch> wrote:
> 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 <arianglan...@googlemail.com> 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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to