wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes showing cursor in textBox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "showing cursor in textBox" Watch "showing cursor in textBox" New topic
Author

showing cursor in textBox

Debashree Halder
Ranch Hand

Joined: Jul 27, 2005
Posts: 81
Hi here I'm using onFocus event on a textbox which will call the following function:

function clearDateField(fieldName)
{
if (document.getElementById(fieldName).value == "mm/dd/yyyy")
{
document.getElementById(fieldName).value = "";
}
document.getElementById(fieldName).focus();
return true;
}

The problem is it is making foucs on the textbox after I press TAB key but it is not showing the cursor. Only if I type something then only the cursor is coming....

How to make the cursor visible after pressing the Tab key from the previous field?

Regards,
Debashree


Debashree Halder<br />SCJP 1.5<br />Washington DC
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Are you using onblur or onchange on the field to call that function?

Eric
Debashree Halder
Ranch Hand

Joined: Jul 27, 2005
Posts: 81
I am using onfocus to call that function
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: showing cursor in textBox