View Full Version : [JS] Problem with Prototype (Function Declarations and Ajax Updater)

31 Mar 2010, 08:20 AM
I'm create a small Ajax application for the web marketing team in the office, and I've hit a snag..

I'm using ModalBox as the interface, and basically I want the user to be prompted, in stages, for certain information. The step process works flawlessly, it's just When it comes to using JS within one of the steps (cloning a group of elements to give the ability to make more than one entry via an OnClick Event.

Now I've found out that you cannot declare functions directly and call to said functions if you're using ajax updater with evalScripts turned on unless you do something like:

coolFunc = function() {
// Amazing stuff!

Now my problem is that, no matter what I try and do, I can't seem to call to the function.
Firebug is telling me that the function doesn't exist.. yet i can the script being called within firebug's html inspector.

Any help would be greatly Appreciated.