On 8/18/06, Peter Lauri <lists at dwsasia.com> wrote: > How do I check if an element with a specific ID exists? > > Before I call a function I need to check if some elements are in the > document already. You can simply check if document.getElementById('id') returns a non-false value. I suspect you want something to happen when the element *is* available. Check out YUI's utility for that: http://developer.yahoo.com/yui/event/#deferral -- Matt Warden Cleveland, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy.