But now I'm facing a problem where I have an <a> element with href="javascript:insideJQuery()", and I'm getting the error message -- "Uncaught ReferenceError: insideJQuery() is not defined". This is expected because the function is inside another function, and therefore is out of scope.
But I can't really move the insideJQuery() function out of the JQuery's function because that function calls other functions within that scope that use a lot of jQuery; that's why it's there in the first place.
How can I access an inner nested function from the outside? The jQuery function isn't exactly a function I can call and have it return a reference to the inner nested function. What should I do?
Excellent responses from both Alexandre Simões and JulianH!
While JulianH provided an excellent workaround for my problem, Alexandre attacked my problem from the root. I come from a classic OOP background with both Java and ActionScript, so I am still in the process of acclimating to the nuances and idiosyncrasies of the PHP and JavaScript world. I am already a heavy proponent and believer of constructor functions, which is what you demonstrated. Your response addressed directly the aspects of JavaScript that I was uncertain of, and I greatly appreciate it!
JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.
ASKER
While JulianH provided an excellent workaround for my problem, Alexandre attacked my problem from the root. I come from a classic OOP background with both Java and ActionScript, so I am still in the process of acclimating to the nuances and idiosyncrasies of the PHP and JavaScript world. I am already a heavy proponent and believer of constructor functions, which is what you demonstrated. Your response addressed directly the aspects of JavaScript that I was uncertain of, and I greatly appreciate it!
I thank you both for your high-quality solutions!