sssweb - 5:25 pm on Jan 4, 2013 (gmt 0)
I'm getting errors in different situations when I don't use the right combination of funcName() & window['funcName'] in defining and calling functions. The errors mainly come up in the context of:
but crop up more in some cases if calls & defs are in different files.
I've run several tests on the various combinations and found the following patterns.
If the defs ARE w/in (doc).ready, these combinations do not work:
1) window['funcName']() call with funcName() def
2) funcName() call & def (exception: works if both are in the same file)
If the defs are NOT w/in (doc).ready, all combinations work. Unfortunately, the defs must go in (doc).ready because they contain jQuery calls.
1) Is there a rule of thumb for using the window designation vs. not
2) Is there some way to code it so that it works in every case?