Forum


Calc Builder Support

Calc Builder support
Forums
Public write access is disabled. Please login

Access matrix values from Javascript 11.12.2014 01:27

Hi,

Is there a way to access the matrix values from Javascript?

I have created several matrices inside Calc Builder and it is clear how to access the values from PHP, when submitting the form. But what if one needs to perform some calculations via Javascript and need the matrices values?

Is there a way or is it necessary to recreate the matrices as Javascript objects ?

Thanks for the assistance

Elena

Re: Access matrix values from Javascript 11.12.2014 08:58

Hi,
the matrix is intended to be used at calculation time, so its available only at the code section, there's no direct/simple way to access database using javascript. If you need to perform additional calculations at the form with js, then you would need to create all needed sources at the javascript section.

Please note you have available a field type 'inline result', which performs the calculations using the php code, and it refreshes the result at the input form, so it may be used to replace javascript calculations and you could use your matrix.


Hope this helps, regards
Moonsoft Team
www.moonsoft.es

Re: Access matrix values from Javascript 11.12.2014 15:59

Hi,

Thanks for your reply.

I think in the end I will create the matrices in Javascript too, anyhow, I find very interesting the inline field.
Can you tell me where I can find more info about how to set this field and its dynamic value ?

Elena

Re: Access matrix values from Javascript 11.12.2014 17:10

Hi,
the inline field only needs to be shown at the input form, and you assign a value for it at the calculator code, as any other variable you handle for the output. You can find a working example of an inline form at your customer area-calculator examples- inline results. Just unzip and import at your calcbuilder backend to check how they are used. Please let us know if you need more help with this.

Thanks, regards
Moonsoft Team
www.moonsoft.es
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect

Our clients' feedback