IE6 not aplying style to DOM created buttons...??? (FireFox working fine)

Discussion in 'Javascript' started by neousr@googlemail.com, Nov 12, 2005.

  1. Guest

    var row = document.createElement('TR');
    row.setAttribute('class',tipoclase);
    .....
    var cell = document.createElement('TD');
    var theButton = document.createElement('input');
    theButton.setAttribute('type','button');
    theButton.setAttribute('value',description);
    theButton.setAttribute('class',ButtonClass);
    cell.appendChild(theButton);
    row.appendChild(cell);

    the above code works fine in Mozilla 1.0.7 (applying the style
    correctly) but it looks like IE doen't care about the "class"
    attribute... It presents fine the table.. but without any style (plain
    old cells and buttons). Any idea? Any workaround?

    Thanks in Advance..
     
    , Nov 12, 2005
    #1
    1. Advertising

  2. Dag Sunde Guest

    <> wrote in message
    news:...
    >
    > var row = document.createElement('TR');
    > row.setAttribute('class',tipoclase);


    row.className = tipoclase;

    > .....
    > var cell = document.createElement('TD');
    > var theButton = document.createElement('input');
    > theButton.setAttribute('type','button');
    > theButton.setAttribute('value',description);
    > theButton.setAttribute('class',ButtonClass);


    theButton.className = ButtonClass;


    > cell.appendChild(theButton);
    > row.appendChild(cell);
    >
    > the above code works fine in Mozilla 1.0.7 (applying the style
    > correctly) but it looks like IE doen't care about the "class"
    > attribute... It presents fine the table.. but without any style (plain
    > old cells and buttons). Any idea? Any workaround?


    In short: element.className = "className";

    --
    Dag.
     
    Dag Sunde, Nov 12, 2005
    #2
    1. Advertising

  3. Guest

    >
    > In short: element.className = "className";
    >


    Not IE6 o FireFox work with that.. they just stuck.

    with " element.setAttribute("class",typeclass); " Firefox works
    perfectly and applies the css style perfectly.. IE6 just ignore that..
    it works but without applying any style. "element" is a element "type"
    "input" for which I set up more attributes that work... only the css
    style don't work with IE6.

    Any Idea
     
    , Nov 12, 2005
    #3
  4. wrote:

    Please provide proper attribution.
    vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    >>
    >> In short: element.className = "className";

    >
    > Not IE6 o FireFox work with that.. they just stuck.


    WFM. Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922
    Firefox/1.0.7 (Debian package 1.0.7-1) Mnenhy/0.7.2.0

    Have you had a look at the JavaScript Console?

    > with " element.setAttribute("class",typeclass); " Firefox works
    > perfectly and applies the css style perfectly.. IE6 just ignore that..
    > it works but without applying any style. "element" is a element "type"
    > "input" for which I set up more attributes that work... only the css
    > style don't work with IE6.


    I think it is because of IE's known problem with "windowed controls".


    PointedEars
     
    Thomas 'PointedEars' Lahn, Nov 12, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    609
  2. Jeff
    Replies:
    0
    Views:
    356
  3. Chuck Martin
    Replies:
    2
    Views:
    213
    Chuck Martin
    Dec 14, 2004
  4. Replies:
    3
    Views:
    166
  5. ApOG
    Replies:
    6
    Views:
    200
Loading...

Share This Page