SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict CommanderZ's Avatar
    Join Date
    Apr 2006
    Location
    Czech Republic
    Posts
    236
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Small DHTML problem...

    I have code:

    Code:
    var htmlObj = document.getElementsByTagName('html')[0];
    htmlObj.innerHTML='<head></head><body>Starting...</body>';
    var bodyObj = document.getElementsByTagName('body')[0];
    bodyObj.innerHTML='Loading';
    I does not work, Firefox echoes "bodyObj has no properties". Does it mean I cannot access generated elements from JS? I thought i can... please explain it to me

  2. #2
    SitePoint Addict CommanderZ's Avatar
    Join Date
    Apr 2006
    Location
    Czech Republic
    Posts
    236
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never mind, problem solved. I inserted vital elements using createElement and appendChild


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •