You can use eval function :
an example and how to use
http://www.devguru.com/technologies/javascript/11460.asp
~N A R E N
On Sat, Jun 20, 2009 at 1:54 PM, Davis ywk...@gmail.com wrote:
Hello;
i want pass a JS function name into a function and call it.
a
that good, many thanks for your help.
call/apply can do it
eval
--
Ever
Now
..
-- Original --
If the function is always global, you could use:
function ajax_loadpage(x_func){
//...
window[x_func]();
};
ajax_loadpage('inittabFeeds');
Better than that would be passing the function object itself, if it's
in scope:
function ajax_loadpage(x_func){
//...
x_func();
};
On Jun 20, 3:24 am, Davis ywk...@gmail.com wrote:
i want pass a JS function name into a function and call it.
Why do you want to pass a name? Just pass the function reference
instead.
a onclick=javascript:ajax_loadpage('inittabFeeds()');babababa/a
5 matches
Mail list logo