checking dom component focus


i've got lightbox textbox displayed controlling an ajax an asp.net updatepanel. lightbox displayed, i focus() slight textbox lightbox move concentration textbox right away.



when firefox, calm box gains concentration problem. ie, calm box does advantage concentration unless i



settimeout(function(){txtbx.focus()}, 500);


to concentration slight glow rather later, after dom component hallowed i'm assuming.



the problem is, immediately above line, i'm already checking component null/undefined, vigilant already should exist hits line, only won't grant itself advantage concentration right divided reason.



obviously sourroundings timer "fix" problem isn't best many glorious proceed solve this. i'd means something following:



var txtbx = document.getelementbyid('txtbx');

if (txtpassword != null) {
txtpassword.focus();
while (txtpassword.focus === false) {
txtpassword.focus();
}
}


is there any proceed tell calm box concentration i something above?



or am i looking during wrong way?



edit

to clarify, i'm job formula page load. book is during tip page, however inside duty called asp.net's asynchronous postback complete, page loads.



because displayed after an ajax update, dom should already loaded, i'm presumption jquery's $(document).ready() eventuality won't useful here.



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members