View Single Post
Old 11-15-2005, 11:21 AM   #8
jaguar
whig
 
Join Date: Apr 2001
Posts: 5,075
kindasortanotreally, there's better ways of doing it though prototype but they're not really needed here and add no real capabilities. I mean I could redefine obj.test as needed and call it directly but unless I need to pass variables with the function, there's no advantage.

Code:
var obj = new Object();

obj.test = function() {
alert("working!");
}

obj.run(param) {
//do something interesting here
param;  //execute param, in theory.
//do something interesting here as well
param //maybe call it again.
}
__________________
Good friends, good books and a sleepy conscience: this is the ideal life.
- Twain
jaguar is offline   Reply With Quote