jQuery in Action, 3rd edition
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
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "showing cursor in textBox" Watch "showing cursor in textBox" New topic

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 = "";
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?


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

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

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
It's not a secret anymore!