ovidiu 2002/09/05 16:55:58 Modified: src/webapp/samples/flow/examples/calc calc.js Log: Remove the prefix handling oddity. Revision Changes Path 1.2 +8 -10 xml-cocoon2/src/webapp/samples/flow/examples/calc/calc.js Index: calc.js =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/flow/examples/calc/calc.js,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- calc.js 19 May 2002 19:23:29 -0000 1.1 +++ calc.js 5 Sep 2002 23:55:58 -0000 1.2 @@ -1,11 +1,10 @@ -var prefix; +var a, b, op; -function calculator(uriPrefix) +function calculator() { - prefix = uriPrefix; - var a = getNumber("a"); - var b = getNumber("b", a); - var op = getOperator(a, b); + a = getNumber("a"); + b = getNumber("b", a); + op = getOperator(a, b); if (op == "plus") sendResult(a, b, op, a + b); @@ -21,20 +20,19 @@ function getNumber(name, a, b) { - var uri = prefix + "getNumber" + name.toUpperCase() + ".html"; + var uri = "getNumber" + name.toUpperCase() + ".html"; sendPage(uri, { "a" : a, "b" : b }); return parseFloat(cocoon.request.getParameter(name)); } function getOperator(a, b) { - var uri = prefix + "getOperator.html"; - sendPage(uri, { "a" : a, "b" : b }); + sendPage("getOperator.html", { "a" : a, "b" : b }); return cocoon.request.getParameter("operator"); } function sendResult(a, b, op, result) { - sendPage(prefix + "displayResult.html", + sendPage("displayResult.html", { "a" : a, "b" : b, "operator" : op, "result" : result }); }
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]