Toggle navigation
Dashboard
Dashboard Tracker
Add / Edit My Forums
System Announcements
Discussion
Active Thread Feed
Top Threads Today
Top Threads This Week
Top Threads Library
Go!
View All
View All
Login
Logout
Home
Forums Index
Browser Side
/
JavaScript and AJAX
8:54 am May 14, 2026
This page requires javascript.
Forum Moderators:
open
Message Too Old, No Replies
Function name stored in variable
lobo235
Msg#:1480245
9:15 pm on Jul 26, 2005
(gmt 0)
With javascript is it possible to store a function name in a variable and somehow invoke that function using the variable? I can do this in PHP but I'm not that familiar with javascript yet.
kaled
Msg#:1480246
9:23 pm on Jul 26, 2005
(gmt 0)
I think this will do what you want.
var test = "funcName";
eval(test + '()');
Kaled.
lobo235
Msg#:1480247
9:24 pm on Jul 26, 2005
(gmt 0)
Great, that worked. Thanks a million!
Join The Conversation
Register
For Free! -
Become a
Pro Member
!
See forum categories
-
Enter the Forum
Moderators and Top Contributors
Moderator List
| Top Contributors:
This Week
,
This Month
,
Apr
,
Mar
,
Archive
,
Top 100 All Time
,
Top Voted Members
Hot Threads This Week
May 2026 Google Search Observations
AdSense Earnings and Observations - May 2026
Country Removal notice from Google Search
SEO question
Page indexed but live url test gets 500 error
Sitemaps for large websites and SEO - add everything or just some?
reverse() -- ColdFusion(or your language)/SQL + JavaScript
Home
Forums Index
Browser Side
/
JavaScript and AJAX
8:54 am May 14, 2026