Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

textbox - onBlur, fire off a Struts action

 
Mervin Chan
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a form. Previously, I submit the form using a button.

Like this:

<html:form action="someAction.do">

<input type="textArea" .... >
<html:submit value="Check" property="event">
...

Its supposed to fire someAction.do?event=Check when button is pressed.

What I want to do, is to write a javascript to fire off the event when the textbox is "onBlur".

How do i do this, when I have other buttons with other "event" values in the same form?
 
alan do
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need to have a name for the button then do document.MyForm.submitButtonName.click(); onBlur.
 
Mervin Chan
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Alan. Worked.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic