#1
  1. No Profile Picture
    Give peace a chance.
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    Buenos Aires, Argentina
    Posts
    83
    Rep Power
    14

    Unhappy writing div contents from javascript (dynamic)


    I have been trying to do this, and looking for how to do it, couldn't find it, can anybody tell me how, from javascript, I can change the contents of a specific (I know the id) div tag on my html file ?
    Please, using DOM, and not propieatry systems for NS4 or IE4, I have already found that but I would like to make it standard.
    Thank you
  2. #2
  3. a lazy guy
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Location
    Hong Kong
    Posts
    99
    Rep Power
    14
    <script>
    ABC.innerHTML = '<font color="red">hello world</font>';
    </script>

    <div ID='ABC'>
    </div>
  4. #3
  5. No Profile Picture
    Give peace a chance.
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    Buenos Aires, Argentina
    Posts
    83
    Rep Power
    14

    Unhappy but....


    but, innerHTML, AFAIK, is not DOM, is it ?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Nov 2001
    Posts
    1,882
    Rep Power
    20
  8. #5
  9. No Profile Picture
    Senior Citizen
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2001
    Location
    leftcoast
    Posts
    2,019
    Rep Power
    16

IMN logo majestic logo threadwatch logo seochat tools logo