Results 1 to 3 of 3

Thread: Inline delegate function syntax with parameter(s)

  1. #1
    Senior Member
    Join Date
    Jan 2014

    Inline delegate function syntax with parameter(s)

    Hi guys

    In a web app, we are calling a js function from an in-line delegate. We are using section.field.commandbutton.delegate() and field.change() delegate.

    We are trying to have a function run when a value is changed and enter/tab pressed. The js function calls a server side function which updates the table and then updates the web UI. We have done this successfully several times before but never had to pass a parameter in in-line delegate calls.

    Need some help with the correct syntax please.

    In desktop js, we are using functionname("charparameter") ie Calc("CASH") which works fine in desktop but doesn't run in browser and produces all sorts of errors.

    lib_abcenergy.js?_v=1.0.950-1629396004775:650 Uncaught ReferenceError: lCalc is not defined
    at CalcDeal (lib_abcenergy.js?_v=1.0.950-1629396004775:650)
    at eval (eval at dispatchDelegate (LianjaHtmlClient.js?_v=, <anonymous>:1:1)
    at window.Lianja.Application.dispatchDelegate (LianjaHtmlClient.js?_v=
    at LianjaHtmlClient.js?_v=
    at Function.window.Lianja.validate (LianjaHtmlClient.js?_v=
    at HTMLInputElement.<anonymous> (LianjaHtmlClient.js?_v=
    at HTMLInputElement.dispatch (jquery-1.10.2.min.js?_v=
    at HTMLInputElement.v.handle (jquery-1.10.2.min.js?_v=

    What is the correct way to format in-line delegate call? We cannot find any examples with parameters.

    We would like to be able to pass a string and also the current value of the field

    We have tried calc(this.value) / calc({this.value}) / calc({}) but none of them work.

    Any ideas?

    Thanks in advance


  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    UK, USA, Thailand
    Blog Entries
    Hi SpringBox

    On what have you defined this delegate code and what have you specified.
    Principal developer of Lianja, Recital and other products

    Follow me on:


  3. #3
    Senior Member
    Join Date
    Jan 2014
    Hi Barry

    Thanks for the reply.

    Seem to have got this working now using the Calc("CASH") format but not sure why it now works





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Journey into the Cloud
Join us