i have a scenario where javascript function name needs to be decided at run time. For simplicity assume i have function name in javascript variable and now i want to create the function using variable value. I went thru the link Javascript - Variable in function name, possible? and tried the small code snippet
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<script>
var temp1='at_26';
temp1: function() {alert("Inside 26"); }
</script>
<BODY>
<a href="javascript:window[at_26]()">Copy Text</a>
</BODY>
</HTML>
But when i click on hyperlink Copy Text it gives error saying Line: 1 Error: 'at_26' is undefined