Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

onblur and onclick convergence

 
Michael McNally
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)I have a BUTTON which has an onblur method that hides a TR which has an onclick method.
2)When the button is blurred, the TR disappears.
If you trigger the onclick method of the TR,
the TR's onclick method isn't called because the onblur method of the button has acted first.
Please help.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
on_click="document.FormName.ButtonName.focus();TheTRFunction();"
Note: Remove the _ from on_click
Eric
 
Michael McNally
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thats great. but how can i write an if blur statement. i have tried:
if ( document.formName.buttonName.blur )
{
// my statement goes here
}
this doesnt seem to work. I cant seem to figure out the propertyName for when an HTMLElement has been blurred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic