- - Code, Content, and Presentation
- ---- inserting a variable into a function
Fotiman - 2:11 pm on Dec 4, 2012 (gmt 0)
eval is an expensive operation. It's often said that eval is evil. :) daveVk's solution is a better alternative.
Regarding your second problem...
Can you post more information about the order the files are included in your markup?
<script src="file1.js"></script><!-- can't call methods in file2.js yet -->
<!-- now you have access to both files -->
Brought to you by WebmasterWorld: http://www.webmasterworld.com