File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes JQuery:-different way to write function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JQuery:-different way to write function " Watch "JQuery:-different way to write function " New topic
Author

JQuery:-different way to write function

Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 637
Hi,

I have written a bind event in following style



i get key object as parameter to onAutoKeyUp(key) function, now i have a requirement to pass few more parameters so i used different style


wonder how to use .keyup and pass more parameters.

-P


All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

That's not the way that JavaScript works. If you need data to be in scope during the execution of a function, closures are the customary way to make sure that it can be accessed.

Without more information I can't really give any examples.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
GeeCON Prague 2014
 
subject: JQuery:-different way to write function