Page 1 of 2

I cant seem to find what I am doing wrong can you look at my code I keep getting errors

Posted: Tue Jul 30, 2013 9:42 pm
by Willie Sims6090317

var input=Appery('paypermile');
var rate=Appery('rate');
var weight=Appery('weight');
//var c=100;
var perhun=weight/100;
var y=perhunrate;
var x=yinput;
alert (x)

I have tried using the .val() both the variables of Y and X but then I get a object nan has no method value
if i use c and replace the 100 with c; It throws a error the ; is unexpected and nothing happens this is a button event


I cant seem to find what I am doing wrong can you look at my code I keep getting errors

Posted: Tue Jul 30, 2013 9:48 pm
by maxkatz

The first line should be:
code
var input=Appery('paypermile').val();
/code

Make sure first you get the right value there.


I cant seem to find what I am doing wrong can you look at my code I keep getting errors

Posted: Tue Jul 30, 2013 10:14 pm
by Willie Sims6090317

Thanks Max I had to at .val() to all three,

One other Question How do you set it up so when a person pushes next on his device they will go to the next input box?


I cant seem to find what I am doing wrong can you look at my code I keep getting errors

Posted: Tue Jul 30, 2013 10:21 pm
by maxkatz

Set the 'tabindex' property.


I cant seem to find what I am doing wrong can you look at my code I keep getting errors

Posted: Tue Jul 30, 2013 11:05 pm
by Willie Sims6090317

Ok

Have not done so yet but now Ive run into a little hitch
tested on an android phone and for some reason my paypermile field is deleting decimal numbers it will accept whole numbers but not like say .28, works fine on the computer window, but when you open it up in an android it deletes it


I cant seem to find what I am doing wrong can you look at my code I keep getting errors

Posted: Tue Jul 30, 2013 11:24 pm
by maxkatz

Probably a browser issue. What input type do you use?


I cant seem to find what I am doing wrong can you look at my code I keep getting errors

Posted: Wed Jul 31, 2013 12:44 am
by Willie Sims6090317

It only does this on the android both by the internet access and by download and install of the apk, The field was set to number all of the ones that are set to number will do this, If I enter any float ie, .28 it will erase the number when I leave the field, but if I access it with my computer browser it works fine
Could it be a floating point issue,?


I cant seem to find what I am doing wrong can you look at my code I keep getting errors

Posted: Wed Jul 31, 2013 12:50 am
by Willie Sims6090317

I cant seem to find what I am doing wrong can you look at my code I keep getting errors

Posted: Wed Jul 31, 2013 12:58 am
by Alena Prykhodko

On what Android version do you test?


I cant seem to find what I am doing wrong can you look at my code I keep getting errors

Posted: Wed Jul 31, 2013 1:32 am
by Willie Sims6090317

Brand new phone 4.1.2, model vs930 will delete the field if you enter a decimal first .28 but will allow whole numbers both testing and by direct install my Acer A200 Android version 4.0.3 does the same,
I have an older android phone a Samsung Charge 2.6 kernal that will enter the data but hangs and freezes I have only added three even javascripts
FLT Button:
var input = Appery('paypermile');
var rate = Appery('rate');
var x = (rate.val()*input.val());
alert (x);

CMH Button
var input=Appery('paypermile').val();
var rate=Appery('rate').val();
var weight=Appery('weight').val();
//var c=100;
var perhun=weight/100;
var y=perhunrate;
var x=yinput;
alert (x);

and Miles Button
var rate = Appery('rate').val();
var miles= Appery ('miles').val();
var pay = Appery ('paypermile').val();
var x = ratemiles;
var y = payx;
alert (y)
This is the only thing that I have changed other than name tags and text box properties to number