Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have used a java script setFocus() function for a "html input(type=text)" in the pageload event of a web application.It is working fine when I am opening the page in IE8.But when opening the page is IE6 ,this function is not working and the cursor is not blinking after selecting by clicking mouse.

-----------------------------------------------------

Basically the text field is used different way for different condition and different log in type.This field has been made enabled ,disabled and invisible and visible many times dynamically for the code.For same condition when opening the page from IE8 the cursor is blinking but when open opening in IE6 in debugging mode java script error is showing message that focusing cannot be done as the control is either disabled or invisible..............
Posted
Updated 15-Aug-10 22:43pm
v2

1 solution

1. Well, almost the whole world has shifted to IE7/8 now and you are still on IE6? Even MS has stopped giving support to it. Why are you still on IE6?

2. About setFocus()... it used to work in IE6 for an input element. You surely are doing some mistake. Please post the code such that one can figure out if anything missing in it.

It should be something like:
document.getElementById("thisTextBox").focus();
 
Share this answer
 
Comments
Rounak Hasan 16-Aug-10 5:29am    
Reason for my vote of 3
actually the client is ie6..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900