Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- inserting a variable into a function


daveVk - 2:50 am on Dec 4, 2012 (gmt 0)


There is no need to eval() in this case

rather than
callback: eval("do_func2_" + URL)

try
callback: window["do_func2_" + URL]

Note that do_func2_XXX is short for window.do_func2_XXX and that a.b can always be written as a['b']


Thread source:: http://www.webmasterworld.com/javascript/4524548.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com