Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8490905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:15:43+00:00 2026-06-10T22:15:43+00:00

I am very new to sencha-touch & started to build simple Login form. My

  • 0

I am very new to sencha-touch & started to build simple Login form.
My UI is ready but now I am stuck on how to write code for login request response.

As important, how can I point to specific url to make POST/GET request?

Also how to get & parse the json data.?

I read the sench-touch documentation but I didnt understood, how to use that model, store, proxy.
Suggestions upon how to create model, store, proxy to make simple login are very helpful.

Thanks in advance.

Edited to insert image:

enter image description here

var loginForm = Ext.create('Ext.form.Panel', {
    fullscreen: true,

    items: [{
        xtype: 'fieldset',
        items: [
            {
                xtype: 'textfield',
                name : 'name',
                label: 'Username'
            },
            {
                xtype: 'passwordfield',
                name : 'password',
                label: 'Password'
            }
        ]
    }]
});

loginForm.add({
                xtype: 'button',
                text: 'Login',
                ui: 'confirm',
                badgeText: '1',
                // handler: function(){
                    // // alert("handler invoked");
                // },

                listeners : {
                tap : function() {

                var form = Ext.getCmp('form-id');
                var values = form.getValues();
                Ext.Ajax.request({
                      url: 'https://102.XXX.X.XX:XXXX/QuizMasterServer/rest/login',
                      params: values,

                      success: function(response){
                          var text = response.responseText;
                          Ext.Msg.alert('Success', text);
                     },

                     failure : function(response) {
                           Ext.Msg.alert('Error','Error while submitting the form');
                           console.log(response.responseText);
                     }
              });
}
}
});



loginForm.add({
    xtype: 'toolbar',

    // id:'loginPressed',

    docked: 'bottom',
    // layout: { pack: 'center' },
    items: [
        {
            xtype: 'button',
            text: 'Login',
            ui: 'confirm',
            // action: 'login',

            handler: function() {
                loginForm.setValues({
                    name: 'vs',
                    password: 'vs'
                })
            }
        },
        {
            xtype: 'button',
            text: 'Clear',
            ui:'decline',
            handler: function() {
                loginForm.reset();
            }
        },

        {
            xtype: 'button',
            centered: true,
            text: 'Sign Up',
            handler: function() {
                alert('New User?');
            }
        },
        {
            xtype: 'container',
            html: 'New User? ',
            style: {
                color: 'yellow',
            }
        },
    ]
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:15:44+00:00Added an answer on June 10, 2026 at 10:15 pm

    You are almost there!

    add your code to the success callback.
    Note, success() callback if fired if ajax returns ok, otherwise failure(). Callback callback() fire in both cases.

    Ext.Ajax.request({
        url: 'https://102.XXX.X.XX:XXXX/QuizMasterServer/rest/login',
        params: values,
    
        success: function(response){
            var text = response.responseText;
            // for example
            var result = Ext.decode(text);  // json parsing
            if (result.ok) {
                //create new widget
                var homeView = Ext.widget('homePage', {...});
                Ext.Viewport.remove(formLogin);
                Ext.Viewport.add(homeView);
                ///... etc
                homeView.show()
            }
            Ext.Msg.alert('Success', text);
        },
    
        failure : function(response) {
            Ext.Msg.alert('Error','Error while submitting the form');
            console.log(response.responseText);
        }
    });
    

    Disclaimer. Of course the code is not tested…

    cheers, Oleg

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a newbie to all the Sencha Touch stuff, but until now I'm very
Very new to Rails, have managed a few simple projects, but now stepping into
Very new to FluentNHibernate, but I'm also excited about the area. I've recently started
I am very new to Sencha Touch framework, want to start with Sencha Touch
very new to javascript, but any help to get me started would be appreciated.
Im using Sencha Touch 2 where i have a login form asking for username
I have recently started a project in Sencha touch with existing Web-services. Being very
Im very new to SQL but need to write a query to do the
I am very new to sencha touch. Working with sencha touch to develop bar
I am very new to sencha touch. I am developing an App using sencha.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.