![]() |
|
The Internet Web sites, web development, email, chat, bandwidth, the net and society |
|
Thread Tools | Display Modes |
![]() |
#1 |
whig
Join Date: Apr 2001
Posts: 5,075
|
Javascript functions...
Here we go again...
I'm playing around with something at the moment, I'm trying to find a way to be able to call pass a function as a paramater to another function, for example: Code:
var obj = new Object(); obj.test = function() { alert("working!"); } obj.run(param) { param; //execute param, in theory. } obj.run(obj.test); obj.test gets executed. Obviously it doesn't work. A bit of playing around had led me to believe it is simply putting the code of the function there instead of running it, whether it's a named function of an anonymous function attached to an object. Anyone got any ideas?
__________________
Good friends, good books and a sleepy conscience: this is the ideal life. - Twain |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|