1

I placed two textboxes at the same position of the web page using z-index.

When page is loaded, the cursor will focus in the enabled textbox that is located under the disabled textbox.

Firefox shows only the disabled textbox and doesn't show the cursor.

My problem is that IE shows both disabled textbox and the cursor in the enabled textbox.

I want to show only the disabled textbox in my webpage. Is there any way to hide the cursor in IE?

It is sample coding...

<script>

   function FocusOnInput(){
       document.getElementById("hidden").focus();
    }

    function show(field){
        var value = field.value;
        alert(value);
    }

</script>

<body onload="FocusOnInput()">
    <div>
      <input type="text" id="securityNo"
         name="txtsecurityNo" value=""
         size="30" style="position: absolute;z-index: 0" 
                 disabled="disabled"/>

      <input type="text" id="hidden"
         name="txthidden" value=""                      
         onchange="show(this);" style="left: 0px;z-index: -1;"/>        
     </div>
</body>

0 Answers0