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

How is the Event Handling in Ajax ?

 
Jesu Mani
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As in java Event Handler is registered with the component that implements the corresponding Interface(ActionListener, ItemListener) and the respective methods ( actionPerformed(), itemStateChanged() ) are to be implemented , Let someone Please help to explain the same in Ajax ?
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AJAX is used to give asynchronous call, without blocking the UI thread. There is no event handling support from AJAX as far as I know. You need to use HTML event handling.

For Example,

For a HTML Button element, on onClick event, you can register your java script method. In that method, you can give a AJAX call.


hth,
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65115
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Masilamani A",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65115
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. Accounts with invalid display names are not eligible for the book promotion.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic