I have the following code: http://jsfiddle.net/LvdcU/3/
I don’t understand why I keep getting the following error:
Uncaught ReferenceError: updatetotalorderCals is not defined
I’m sure this has everything to do with my limited js knowledge.
UPDATE:
So the original example error has been resolved, but when applying it to my real-world code, the error returns. I’ve update jsFiddle with all of the applicable code: http://jsfiddle.net/LvdcU/8/, (probably more than necessary this time) in hopes of getting this working. Thanks!
It’s a scope issue. You have the fiddle set to
onDomReady. If you view the source of the page created by the fiddle, you will see this:Because your function is being placed within another function, it is not accessible outside of that function. Change it to
no wrap (head)and you will see that it works.