View Single Post
  #2 (permalink)  
Old Apr 18th, 2008, 08:44
spinal007's Avatar
spinal007 spinal007 is offline
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,612
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Calling functions with variable?

Yep. Just tried this code in Firebug and it worked:
Code: Select all
function myfunc() {
    alert("Hello!");
}

function call_function(func) {
   func();
}

call_function(myfunc);
You might wanna check it out in IE though... this is exactly the sort of thing MS likes to mess us around with.
Reply With Quote