SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Solved - DOM Updated Question

    I have a site with a 3 column layout. Because the size of the columns may be different onLoad, I am using Javascript to make each of the columns the same height. This works great when I load the page.

    However, my site updates these columns using AJAX. After the update, one column may have become longer than the others. I am trying to find a way to detect this change and then again make all 3 columns the same height.

    My first approach was with an event handler that detected "onsubtreemodified" for these DIVs. Unfortunately, this is a fairly new W3C DOM event that is not currently supported by most browsers.

    My next idea was to simply call the function that did the resize with the onClick event when the user did anything that would update the columns. This does not work because Javascript does not wait until the DOM is finished updating before executing the code that checks sizes. So, it still sees the columns as the same height and doesn't make adjustments.

    Does anyone know how to accomplish this?

    Thanks
    Last edited by justbn_me; Jan 22, 2007 at 16:39. Reason: Solved
    Justin Noel
    Better Than Broadway - The Best Local Theatre Calendar
    www.betterthanbroadway.com/


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
  •