When the browser is parsing an html page and it is comming across a <script> tag, it'll parse the contents immediately, because there can be document.write('<span>bla</span>') like statements inside there that need to be parsed at that point. So, when you need to access HTML elements like the anchor you are trying, it must be parsed by the browser at the time your script is fired. Kim > Hell, I didn't know you had to worry about that..... > > Thanks all > > James > > At 13:52 21/07/2005, you wrote: > >> Are you calling this *after* the page loads? Or at least after that >> link exists? :-) >> >> -- >> Hassan Schroeder ----------------------------- hassan at webtuitive.com >> Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com >> >> dream. code. >> >> >> _______________________________________________ >> Javascript mailing list >> Javascript at LaTech.edu >> https://lists.LaTech.edu/mailman/listinfo/javascript > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript