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 8250403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:52:37+00:00 2026-06-07T23:52:37+00:00

I am trying to modify someone else’s extjs code and I really need some

  • 0

I am trying to modify someone else’s extjs code and I really need some help.

Basically when a username/password is validated the dashboard.js is called which is included in index.php.
Now what I need to do is after the username/password is validated I need another form to popup asking for confirmation number.
This does not need to be validated(just check for empty string), just entered in the form and I need to save it in a session.

 //index.php
    <script>
            Ext.onReady( function() {

                Web.ip = '<?php print $_SERVER["REMOTE_ADDR"]; ?>';

                var sessionInfo = Web.getCookieInfo();
                if( sessionInfo ) {
                    Web.Dashboard.init();
                    Web.user = sessionInfo;

                    Web.Dashboard.loadDefault();
                } else {
                    Web.Login.init();
                    Web.Dashboard.init();
                }
            });
        </script>

//dashboard.js
Web.Dashboard = function() {

    var contentPanel = new Ext.Panel({
        region: 'center',
        layout: 'fit',
        margins: '0 5 5 0',
        border: true,
        html: ''
    });

    return {

        init: function() {
        ........
        }
    }
}();

Here is my success function called inside onsubmit function:

success: function( result, request ) {

    try {
        var obj = Ext.decode( result.responseText );
        if( obj.success ) {
            var permissions = obj.USER[0].VALUES;
            var p = {};
            for( var i=0 ; i<permissions.length ; i++ ) {
                p[permissions[i].PERMISSION] = true;
            }


            Web.Dashboard.loadDefault();
        } else {
        //alert ('got here');
            if (obj.ErrorCode == 20410 ) {
                th.changePasswordWindow.show();
                return;
            }
            th.loginPanel.form.reset();
            th.loginWindow.displayInfo( 'Invalid username/password' );
        }
    } catch( ex ) {
        th.loginWindow.el.unmask();
        th.loginPanel.focusUsername();
        th.loginPanel.form.reset();
        th.loginWindow.displayInfo( 'Error: ' + ex );

}

},

  • 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-07T23:52:39+00:00Added an answer on June 7, 2026 at 11:52 pm

    Ok, edit with a simple ActionSheet, containing another form, it will be a separate form with a single input field – change textfield.name and formpanel.url so that it matches your serverside.

    Once you in your success after a login, create the sheet (or another modal panel popup). Render and show, then send another request to server with formpanel.getForm().submit() and you should be good to go.

    This sample ActionSheet which has a button handler, adapt that function to your needs (redirecting after success etc)

    function loginDone() {
    ...
     if(success) {
     var pincodeSheet = Ext.create("Ext.ActionSheet", {
        items: [{
            xtype: 'toolbar',
            cls: 'actionSheetToolbar',
            itemId: 'id_title',
            docked: 'top',
            title: ''
        }, {
            xtype: 'spacer',
            height: 10
        }, {
            xtype: 'formpanel',
            padding: 10,
            url: 'set_session_variable_serverside.asp', // adapt this
            items: [{
                title: 'Please enter PIN',
                cls: 'loginTbarTop',
                xtype: 'toolbar',
                docked: 'top'
            }, {
                xtype: 'toolbar',
                docked: 'bottom',
                cls: 'loginTbarBottom',
                items: [{
                    xtype: 'spacer'
                }, {
                    xtype: 'button',
                    text: 'OK',
                    ui: 'action',
                    handler: function(btn,evt) {
                        // perform any validation here
                        pincodeSheet.down('formpanel').getForm().submit();
                    }
                }]
            }, {   /* end docked */
                cls: 'loginFormFieldset',
                xtype: 'fieldset',
                defaults: {
                    labelAlign: 'left',
                    labelWidth: '35%',
                    clearIcon: false
                },
                /* form field declarations */
                items: [{
                    tabIndex: 1,
                    xtype: 'textfield',
                    name: 'session_variable', /// name of input field
                    label: 'PIN CODE'
                }] /* end form fields */
            }] /* end form panel items */
        }] /* end sheet items */
     });
     pincodeSheet.render(document.body);
    
    
     }
    
    ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Rails engine (someone else's gem) that I am trying to modify
I'm trying to modify a script that someone else has written and I wanted
I am trying to modify the code below to check the input from a
I'm trying to modify this code in an attempt to make it work on
I'm trying to use django-evolution to modify some models from an existing project. Now
I'm stepping through someone else's code to find what's breaking mine under a certain,
I'm hoping someone can point me in the right direction. I'm trying to modify
I m trying to modify some C++ files in ns2 and then recompile using
If someone is purposely trying to modify two files to have the same hash,
I'm trying to modify an svg tag with javascript to make it resizable, but

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.