File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Assign Two Methods at a Time

 
ramnna jain
Ranch Hand
Posts: 129
Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In my javascript code I want to assign two methods at a time:



I want to set another function 'checkAvailability()' on 'onblur', but how ... please any buddy can help me..!

Thank you.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't when using Model 0 event handling.

You'll need to either:
  • enclose the two functions in the inline function
  • use DOM Model 2 event handling (warning! browser-specific minefield ahead)
  • user a library like jQuery that makes this easy

  • You're already enclosing the call to one function in an inline anonymous function, just add a second call.
     
    Bear Bibeault
    Author and ninkuma
    Marshal
    Pie
    Posts: 64192
    83
    IntelliJ IDE Java jQuery Mac Mac OS X
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    For option 1 above:

     
    ramnna jain
    Ranch Hand
    Posts: 129
    Java
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thank you Bear... with your help the problem is solved... thank you again.
     
    I agree. Here's the link: http://aspose.com/file-tools
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic