![]() |
|
The Internet Web sites, web development, email, chat, bandwidth, the net and society |
|
Thread Tools | Display Modes |
![]() |
#8 |
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 |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|