sssweb - 4:56 pm on Jan 5, 2013 (gmt 0)
I sort of follow you about the scope thing, but I'm admittedly out of my league on this. I also don't want to waste your time carefully explaining things I'll never understand(!)
That said, I just want code that allows my functions to work in every case (or to at least know the conditions that don't work so I can avoid them). So let me start from scratch and explain what I'm doing, and you can suggest the best approach.
I have a jquery slideshow script (which I use to show text pages, not pic slides) and also several jquery scripts that run text effects on the various pages. All these scripts, with their various functions and calls, must work together. To keep things neat, I thought to write the code generated by each script to a separate file (maybe this is part of the problem; I could print everything to the same file, but I sometimes still get the errors). Everything starts from the slideshow, which runs in a ready() function. (That's the instruction that came with the script. My understanding is that the ready() function ensures that the script won't run until all the page data - e.g. occasional pics, etc. - is loaded; that's what I want.) Also, all func defs & calls in external files run in ready() functions.
Re why I sometimes need the window format, in some cases the function name is dynamically generated and per my question in this thread [webmasterworld.com...] -- see page 2, you guys suggested that. I'm starting to think that it's more trouble than it's worth and that I should dump the variable func names, which I can do without. The problem though, as stated in my OP (error #2), is that I sometimes get errors w/o using window.
What's the best way to go with all this?
I hope you see a clear solution. If not, let me suggest one that might work, and see if you agree: I dump the variable function names and the window format, and write everything to the same file and ready() function.
I still want to hear your ideas, since mine requires a fair amount of re-coding. Thanks for your help on this; I really appreciate it.