This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I find out text-change in readonly text box ?  RSS feed

 
Deepa More
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I wanted to call one function on text-change of read only text box.
Its a readonly text box for date field. Date is selected by button besides it which opens calendar.When date is changed, I wanted to recalculate time field.
How do I do that?
Any help is appreciated.
 
bhuvan sundar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this:

function setDate()
{
document.form.textbox.value = selected date;
document.form.textbox.focus();
}

function calTime()
{
//do your calculation
}


Call setDate() in the onClick of the button and calTime() in the onFocus of the textbox.

Hope this helps you..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!