// Javascript code for onFocus event
// FIREFOX Event
if (document.addEventListener) {
window.onload = function (evt) {
//Set the focus to table in firefox
document.getElementById(‘table_id’).focus();
}
}
else {
/* for IE 6 and IE 7
window.onload = function (evt) {
//Evaluates an expression after a specified number of milliseconds has elapsed.
setTimeout(fieldFocus , 100 );
}
/* TODO : Still to check in all other browsers
}
//function for field focus
function fieldFocus() {
document.getElementById(‘table_id’).focus();
}
I written abouve to code to set focus to table it is working for IE not for FIREFOX
Pls give me ideas