Forum


Calc Builder Support

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

Hide calculate button and click it 11.05.2015 21:18

Hello again!

As you told me, I can force calculation by simulating a click the calculate button:

CB("input[name=calculate]").click();

Now let's have it a little more tricky: I'd like to use "Hide Calculate button and get results on change value of every field" - then, the script above doesn't work because there's no calculate button. Is there a way to combine both functionalities? Do I have to add an onblur event to every input field and fire the calculate click?

Best regards

Alex

Re: Hide calculate button and click it 12.05.2015 08:49

Hello,
when you 'hide' the calculate button from the configuration, the button is not present, so the event function won't work for it. You could hide it from the script instead:

CB("input[name=calculate]").hide();


but if you also need to trigger calculation on every field change, then the better approach would be to use the configuration, and trigger the change event of any of the fields to launch calculation instead. Let's say you have a field with var name= myfield1 , you could use:

CB("input[fldname=myfield1]").change();


to trigger onchange event, that will trigger calculation according to your configuration.

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

Re: Hide calculate button and click it 12.05.2015 15:44

Thanks a lot!
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