+ Reply to Thread
Results 1 to 4 of 4

Thread: Altering elements made with innerHTML

  1. #1
    Ixonal is offline x10Hosting Member Ixonal is an unknown quantity at this point
    Join Date
    Sep 2008
    Posts
    29

    Altering elements made with innerHTML

    I'm workin on my website with AJAX and I want to create the menu on the server side, and just chunk that code into the navBar.innerHTML variable with javascript. Thing is, after I do that I want to alter properties of the menu objects. So I guess my question is are elements added to a page through innerHTML added to the DOM as well?

    if not, I can always just send back raw data and construct the elements client side, it's just more annoying that way.

  2. #2
    dickey's Avatar
    dickey is offline x10 Sophmore dickey is an unknown quantity at this point
    Join Date
    Sep 2008
    Location
    Singapore
    Posts
    128

    Re: Altering elements made with innerHTML

    yes. it will be added to the dom tree and you will be able to traverse it using one of the many ways.

  3. #3
    Ixonal is offline x10Hosting Member Ixonal is an unknown quantity at this point
    Join Date
    Sep 2008
    Posts
    29

    Re: Altering elements made with innerHTML

    ok, so I should be able to use getElementById() to get 'em? See, I had tried something like this before and I couldn't use appendChild() on the elements added in this way, so I was thinking there would be a function to reform the DOM or something. Oh well, I'll try this out this way and get back if it doesn't work out.

  4. #4
    dickey's Avatar
    dickey is offline x10 Sophmore dickey is an unknown quantity at this point
    Join Date
    Sep 2008
    Location
    Singapore
    Posts
    128

    Re: Altering elements made with innerHTML

    So I guess it worked right? just note that appendChild() should work though do you have a code you have been working on?

+ Reply to Thread

Similar Threads

  1. How someone made $10,000-$15,000/day, from a site.
    By admintwo in forum Earning Money
    Replies: 8
    Last Post: 03-19-2008, 06:46 PM
  2. Pure Elements - A sig by Equiflux
    By Equiflux in forum Graphics & Webdesign
    Replies: 5
    Last Post: 07-02-2006, 09:04 AM
  3. Toasters
    By Richard in forum Off Topic
    Replies: 9
    Last Post: 03-29-2006, 04:21 AM
  4. My site wasn't made last night at midnight!!
    By masterchief3k in forum Free Hosting
    Replies: 10
    Last Post: 03-21-2006, 03:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers