facebook

Compass Navigation Example (Wayne) HELP

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 6 posts - 31 through 36 (of 36 total)
  • Author
    Posts
  • #347974 Reply

    Brandon
    Member

    You can use my sample (copy and paste), and instead of the == sign just use < for greater than and < for less than. As in your sample you attached you can use the && to get the range.

    #347975 Reply

    Thank you

    the first part is working proparly
    The second (else if) doesnt for some reason
    please check the code

    if ($(‘#m1-degree-info-LPdegree’).val() >= (‘0.00’) && (‘#m1-degree-info-LPdegree’) < (‘15.00’)); {
    $(‘#m1-degree-info-test1’).text(‘You put in 0-15’);

    } else if ($(‘#m1-degree-info-LPdegree’).val() >= (‘15.00’) && (‘#m1-degree-info-LPdegree’) < (‘30.00’)); {
    $(‘#m1-degree-info-test1’).text(‘You put in 15-30’);
    }

    #348010 Reply

    Dear Brandon,

    havent found solution till now.
    Can you help?

    #348011 Reply

    Brandon
    Member

    Off the top of my head try this:

    if ($(‘#m1-degree-info-LPdegree’).val() >= (‘0.00’) && (‘#m1-degree-info-LPdegree’) < (‘15.00’)){
    $(‘#m1-degree-info-test1’).text(‘You put in 0-15’);

    }
    if ($(‘#m1-degree-info-LPdegree’).val() >= (‘15.00’) && (‘#m1-degree-info-LPdegree’) < (‘30.00’)) {
    $(‘#m1-degree-info-test1’).text(‘You put in 15-30’);
    }

    #348012 Reply

    Brandon,
    i have tried this one, but does not work.
    Any other idea?
    Can you test the previous mobi-file i send you ?

    Edit:
    I found the error

    if ($(‘#m1-degree-info-LPdegree’).val() >= 0 && $(‘#m1-degree-info-LPdegree’).val() < 15){
    $(‘#m1-degree-info-test1’).text(‘You put in 0-15’);
    }
    else if ($(‘#m1-degree-info-LPdegree’).val() >= 15 && $(‘#m1-degree-info-LPdegree’).val() < 30) {
    $(‘#m1-degree-info-test1’).text(‘You put in 15-30’);
    }

    #348019 Reply

    Brandon
    Member

    One more off the top of my head (Im not on a dev system atm)

    if ( $(‘#m1-degree-info-LPdegree’).val() > ‘0.00’ && $(‘#m1-degree-info-LPdegree’) < ‘15.00’){
    $(‘#m1-degree-info-test1’).text(‘You put in 0-15’); }

    if ( $(‘#m1-degree-info-LPdegree’).val() > ‘15.00’ && $(‘#m1-degree-info-LPdegree’) < ‘30.00’ ) {
    $(‘#m1-degree-info-test1’).text(‘You put in 15-30’); }

Viewing 6 posts - 31 through 36 (of 36 total)
Reply To: Compass Navigation Example (Wayne) HELP

You must be logged in to post in the forum log in