- This topic has 17 replies, 5 voices, and was last updated 11 years, 8 months ago by Stu Wade.
-
AuthorPosts
-
philipdkMemberhi
i need help
i am trying to make a health app and need the person to enter 2 sets of numbers,
then i need to put a math formula in and have the answer displayed in the 3 box.i have 3 textfields but i dont know if i have it right and how to put the formula in
and to get the answer.
nvtsMemberHello,
I created a sample app for another user a while back that has calculations in it. This should help with what you are asking. Down load the app and look in the app_custom.js file to see the javascript.
http://www.genuitec.com/support-genuitec/viewtopic.php?f=8&t=5339&start=10
Cheers…
Stu WadeMemberA quick three ha’pence worth… If the formula is at all complex, Google ‘JavaScript Math’ to determine the syntax for the more tricky functions.
Hope this helps.
BrandonMemberWithout knowing your box names or what formula you need here is a quick sample of what it might look like. You could place this in a button action Run Javascript.
var myNumber1 = $(‘#m1-myscreen-textField1’).val();
var myNumber2 = $(‘#m1-myscreen-textField2’).val();$(‘#m1-myscreen-textField3’).val(myNumber1 + myNumber2);
philipdkMemberthanks for the help,
but i am new to the whole programming side,
did some visual basic, which was easy
but i purchased this as it was a visual program
and with you have given me is good
but where do i put it, or how do i put it in.i am doing this as these formula’s are known
to the diabetes educators and i was wanting
to give this to everyone to help them,
but what you have given me is with this
program is easy to you but to me a beginner
is really hard.thanks anyway
nvtsMemberI do not mind helping.
Create the screen as you want and upload a screen shot with the calcs you are wanting and I will post an example like I did for the other user to learn from.
Cheers…
Stu WadeMemberGood for you! I would have made the same offer were I not separated from my PC at the moment.
philipdkMembersorry for the delay
how do i post a picture
paulDMemberScreen shot your design, then use the upload attachment option in your post.
philipdkMemberhere is my formula
first
CF=100/TDD
TDD=short+long
Second
ICR=500/TDD
any help would be great, i dont know if i have the right text boxes or button
Attachments:
You must be logged in to view attached files.
philipdkMemberthere maybe 2 more pages but i havent decided yet
about them, this is the main page that needs the calculation.
Stu WadeMemberThe last piece of information we require to be able to complete the calculation is: how many decimal places would you like to be displayed in the output fields?
Stu WadeMemberTry this – I have zipped up a version for you
Attachments:
You must be logged in to view attached files.
Stu WadeMemberGentle bump, the OP has not yet responded.
philipdkMembersorry for the delay in getting back to you, this is the trouble with shift work
it needs to be a 2 decimal point, and though it works great the worst part
is i dont know how it was done.it looks like java code you imbedded into it, which means if i need to do more
with this program i need to learn java, maybe i should have purchased
microsoft visual studio instead of mobione as i have had abit of work
with visual basic.i am working on my second screen which will consist of a text box
but needs to have one or both the answers pasted into the
explication to give people more info.but many thanks it is a start
-
AuthorPosts