I have an ajax call that goes to the server, retrieves a new html table and places it inside a div in the current document (replacing an existing table). My next line of code checks the new table for certain values.

The trouble is the javascript dom is not updated in time for this reference, and the data from the old table is loaded instead. I need something like body's onload event for my ajax table to be able to reference it once it loads completely in the browser's dom.

Is there some method/workaround to do this?

thanks in advance