facebook

Help with javascript code

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 8 posts - 31 through 38 (of 38 total)
  • Author
    Posts
  • #348418

    Code_A
    Member

    Just your main cosy one should be fine.

    #348419

    Henzalah
    Member

    this is the one which is not working (code problem)

    #348420

    Code_A
    Member

    Paste this code into your project. It works. You were using screen name ‘cosy’ instead of ‘welcome’. Also, if you want to go to apartment2, then you need to enter the corresponding login values in the array (i.e., user2, pass2).

    var users=new Array("user1","user2","user3");
    var pass=new Array("pass1","pass2","pass3");
    
    var aptNum = $('#m1-welcome-textField1').val();
    var username= $('#m1-welcome-textField2').val();
    var password= $('#m1-welcome-passwordField1').val();
    
    if (users[aptNum -1] == username && pass [aptNum -1] === password){
        //pass
        phoneui.gotoScreen('m1-Apartment' + aptNum);
    }else{
        //fail
        phoneui.alert('Login information invalid.');
    }

    Hope this helps.

    #348421

    Henzalah
    Member

    yes it is 🙂

    thanks a lot i appreciate ur help and support

    #348466

    Henzalah
    Member

    I would love to ask if there is any DB prefered for replicating with the app
    And is it possible to use Access DB for such task??

    I will start creating the DB in the coming days si i would love to be guided to the right way or the best way to do such thing.

    Regards.

    #348467

    Henzalah
    Member

    I would love to ask if there is any DB prefered for replicating with the app
    And is it possible to use Access DB for such task??

    I will start creating the DB in the coming days so i would love to be guided to the right way or the best way to do such thing.

    Regards.

    #348494

    Code_A
    Member

    All of my experience with web services and development has been with mySQL databases using PHP as the web interface. This is a very popular combo. Access is not a web based DB. Once you get the DB backend setup, you could then dynamically load content to your app via AJAX without the need for hardcoded user data and individual mobi files for each apartment.

    #348676

    Henzalah
    Member

    hallo code A

    can i ask for ur help in MYSQL incase u dont mind we can talk through GMAIL if it ok for u

    Regards,

Viewing 8 posts - 31 through 38 (of 38 total)
Reply To: Help with javascript code

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