Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Twitter Sign In with OpenID Sign In with Google

Sign In Sign Up

In this Discussion

Tagged

Welcome to the Jo support forums! Please Sign Up and join in the discussion. You can also Sign In instantly with Twitter, OpenID or your Google ID.
noob - how i can do a login jocard with check on user and password?
  • xsnakedxsnaked July 2012
    Posts: 3

    i'm sorry ... Could someone help me?


    this is my code

    tryit = new joRecord({
    uid: "jo",
    pwd: "password"
    }).setAutoSave(false);
    login2 = new joCard([
    new joGroup([
    new joLabel("Username"),
    new joFlexrow(nameinput = new joInput(tryit.link("uid"))),
    new joLabel("Password"),
    new joFlexrow(new joPasswordInput(tryit.link("pwd")))
    ]),
    new joFooter([
    new joDivider(),
    button = new joButton("Login")
    ]),
    button.selectEvent.subscribe(function(tryit){ 
    if( tryit.link("uid") == "xxxx" ) { stack.push(login); } else { stack.push(menu); } })
    ]).setTitle("Login");

    I try different ways but the "if "check don't function..where am I doing wrong?

    Thanks to all ... 
  • xsnakedxsnaked July 2012
    Posts: 3

    i found where wrong...


    if( tryit.link("uid") == "xxxx" ) { stack.push(login); } else { stack.push(menu); } })
    ]).setTitle("Login");


    if( tryit.getProperty("uid") == "xxxx" ) { stack.push(login); } else { stack.push(menu); } })
    ]).setTitle("Login");