I'm actually very stuck. Basically speaking, we have two function scopes and a global scope that we must work around.
-In the global scope, I have declared a property named isTaxable = false;
-Then, in the AddToCart() function scope (which is the scope that collects data from my form) I asked the interpreter if a form field named TAXABLE exists. And if it does, the value of my global window property changes to true.
Finally, in another function scope named ManageCart(), I want to change my tax variable(fTax) to depend on the value of isTaxable, like so...
Unfortunately, isTaxable is always false in the global scope. Though, I have tested the function that changes isTaxable to true and in that function scope it works. If you want to see the script I am talking about to get an understanding of it, you may download it from
http://www.statuniform.com/javascript/nopcart.js Though it does not contain any of the code we are talking about here because it is on a live shopping cart system.
[ July 12, 2003: Message edited by: Michael McNally ]