Apply CSS rules in JavaScript to the content generated by DOM-style-code

    Date: 05/19/07 (Javascript Community)    Keywords: css, html, xml, java

    Could anyone explain me, how should I apply CSS rules in JavaScript to the content generated by DOM-style-code? I need DOM since document is served as XML.

    Check the following example:

    
    
    
    
    
    
    Test
    
    
    
    

    It works with Gecko / Opera / MSIE without XML parsing (name the document test.html and check). But as XML it works with Opera only (check test.xml). Gecko generates content, but ignores hi.className = "hi" (and DOM-style class attribute setting works only in Opera too).

    Source: http://community.livejournal.com/javascript/133725.html

« Here's one for you || disable iframe history »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home