This is what I see in the HTML page:

function calc() {
    var transport = new Thrift.Transport("/thrift/service/tutorial/");
    var protocol  = new Thrift.Protocol(transport);
    var client    = new CalculatorClient(protocol);

    var work = new Work()
    work.num1 = $("#num1").val();
    work.num2 = $("#num2").val();
    work.op = $("#op").val();

    try {
      result = client.calculate(1, work);
      $('#result').val(result);
      $('#result').css('color', 'black');
    } catch(ouch){
      $('#result').val(ouch.why);
      $('#result').css('color', 'red');
    }
  }

That is the function called calc() which is being called. Looks correct to
me.

On Fri, Aug 24, 2012 at 2:16 PM, Elswick, Richard <elswi...@us.panasonic.com
> wrote:

> I have not compiled the java or c++ server side code for the Javascript
> tutorial, but it seems that it is broken as the .html page that comes in
> the tutorial shows as the method call being calc(), not
> calculate(logid,Work) as shown in the thrift file.
>
> Do I understand this correctly?
>
> Thanks,
> Richard Elswick
>



-- 
Juan Wellington Moreno
*Software Engineer*
Potomac Fusion
7230 Lee Deforester Drive, Suite 100
Columbia, MD 21046
Work: (410) 794-9040 ext 317
Work Direct: (410) 794-9017
Main: (347) 541-9256

Reply via email to