I am having a jsp/html page.This page is accessed from two different links. It is Menu1-->demo.html page and from Menu2-->demo.html page(In my case its jsp) In the demo.html page I am having a text box which is disabled by default.
<input class="mytextinputtextField" type="text" id="countryOfOrigin"
readonly style="background-color:#DCDCDC" />
Now when the demo.html page is accessed from Menu2 , I am checking it using a hidden parameter and again enabling the text box and setting the focus on the text box.
if(document.getElementById("submenu_name").value=="PM")
{
document.getElementById("countryOfOrigin").focus();
}
The field is enable and the cursor is visible but if I type the text is not typed in the text box. I need to click on the text box to enter the text. I think it is because of the disabled and again enabling the field . Please can any one help me to be able to type in the text box on the focus event from javascript. I am not using JQuery and the browser is I.E 6