focus on page load

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
rabbit
Beginner
Beginner
Posts: 1
Joined: Wed Jan 25, 2006 3:15 am

focus on page load

Post by rabbit »

I have a menu that contains:

aI("type=html;text=<input type=text tabIndex=1 id=PartNumber accesskey=p/>;");

also tried text and form types.

I would like to have the textbox have focus when the page loads but the tabindex does not seem to be honored (ie6) and calling document.all.PartNumber.focus in the documents onreadystatechange when document.readyState=="complete" fails because the element has not been created yet.

I did try setting the focus using a window.setTimeout(....) which also seemed to fail.

Any ideas oh dhtml menu gods :)
Thanks in advance,
JB
Post Reply