- This topic has 6 replies, 3 voices, and was last updated 13 years, 10 months ago by flexart.
-
AuthorPosts
-
flexartParticipantHi
Is there a way to integrate a calculation system with the program?
If not. Is the code open to use a developer to do itThanks,
Edwin
support-michaelKeymasterEdwin,
Can you expand a little bit more on what you mean by “calculation system”? For example if you need to invoke custom logic in your app this is very doable assuming your logic can be called from a JavaScript function.
Wayne
Genuitec Mobile Team
flexartParticipantHi Wayne
The calculation is very simple.
Wide X Depth X Thickness = Total
10 X 20 X 0.5 = 100
See attachmentWhen will scrolling in text available?
Thanks,
Edwin
Attachments:
You must be logged in to view attached files.
MolxMemberYou can do it just like Wayne said, with javascript.
Create your input text fields and name them accordingly. Do the same for the output field.
Go to your <project>_custom.js and create a function that loads the input texts into variables with getElementByID()
Do whatever calculations you want with your inputs, and them assign the result to the output field using getElementByID() aswell.
Finally, you will need a button to call your function, create it and link it to javascript:calculate().I’ll try to create an example for you and post here.
-Edit-
Here we go, you can play around with onChanged listener, max chars for inputs, etc.
Attachments:
You must be logged in to view attached files.
flexartParticipantUpdate
I exported and uploaded the files to the server and checked it on my iphone, but the calculation is not working online.
I can fill in the fields, but when i click calculate it is not doing anything.See link:
http://flexhost.com.au/test/calcHi Molx
Thank you so much for doing that! Much appreciated.
It is exactly the way what i needed.Thanks again,
Edwin
MolxMember@flexart wrote:
I exported and uploaded the files to the server and checked it on my iphone, but the calculation is not working online.
I can fill in the fields, but when i click calculate it is not doing anything.You changed the filename somewhere to index.html, and MB1 changed the calc_custom.js to index_custom.js in the html code. If you check for the original calc_custom.js, it’s there (but looks like a standard custom.s file, not sure why).
Just make sure you have the correct _custom.js file uploaded and referenced to!
See ya =)
flexartParticipantHi
Yes, you are right. It is working now.
Thanks for your help!
Cheers,
Edwin
-
AuthorPosts