I have a pull down to list countries on my form. When the user selects a country, it refreshes the page by calling the backend (Java) code (This is primarily done to update a bean). When the page returns the focus on the country field is lost. In order to fix this, I placed a <a name> tag in the html right before the country tag and call the javascript function below:
function setCountryFocus(){
document.forms[0].addrCountryCode.focus();
}
Problem: If I keep hitting the countries starting with "F", sometimes the focus goes to the BROWER's FILE->NEW. If it starts with "V" it goes to BROWSER's ->VIEW.
Can someone help me with this. Need to fix this bug asap.
Thanks!!
Problem: