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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:47:52+00:00 2026-06-01T14:47:52+00:00

I run my interface like this, m1 just grabs the elementById and sets the

  • 0

I run my interface like this, m1 just grabs the elementById and sets the onclick attribute to the function name.

Because I want to “instantiate an object” I create a public static method called

 ControlSignIn.interface

which then creates and invokes my object like this:

new ControlSignIn().invoke();

Is this the best practice way to do this?

Min.m1( 'signin_button', ControlSignIn.interface );

break:

var ControlSignIn = function( ) 
{
    var form_element = document.getElementById( 'signin' ); 
    var response_element = document.getElementById( 'signin_response' ); 
    var text_object = new Text( form_element );
    var message_object = new Message( response_element );

    this.invoke = function( ) 
    {
        if( Global.validate_input_on === 1 )
        {
            if( !text_object.checkEmpty() ) 
            {
                message_object.display( 'empty' );
                return false;
            }
            if( !text_object.checkPattern( 'email' ) ) 
            {
                message_object.display( 'email' );
                return false;
            }
            if( !text_object.checkPattern( 'pass' ) ) 
            {
                message_object.display( 'pass' );
                return false;
           }
        }
        AjaxNew.repeatUse( ajaxSerialize( form_element ) + '&ajax_type=signin_control', function( server_response_text ) { ajaxType( server_response_text, response_element, 'respond' ); } );
    }
};

ControlSignIn.interface = function()
{
    new ControlSignIn().invoke();
};
  • 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-01T14:47:54+00:00Added an answer on June 1, 2026 at 2:47 pm

    Mmm. there are a lot of global objects in there. Too much coupling, regardless of the language.

    ControlSignIn.interface = function()
    {
        new ControlSignIn().invoke();
    };
    

    Not sure why you create a new instance of ControlSignIn and then call its methods. Also, assign to the prototype like you did for invoke. Not sure why you need this method at all to be honest.

    To be honest, I have a faint idea what you are trying to do (it’s some sort of form validation, right?) but it’s all quite convoluted and I don’t even know where to start.

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

Sidebar

Related Questions

I am getting this run time error when using IID_IWebBrowser2 interface of CLSID_InternetExplorer. Run-Time
I want to change my user interface language at run time. what is the
I've just come across some code in Three20 that looks like this: SEL sel
I've an application which aims to run only as a service (no interface, just
Hi I was working on a bit of fun, making an interface to run
I am extending an interface with lua, and I've run into a problem in
I would like to develop Mac applications, but don't want to use XCode. I
Just so it's known, this question is mostly academic, even though I tried to
I'm replacing a winforms screen with an html interface, which needs to run in
Are there any mySQL frontends, like phpmyadmin, that has a graphical interface for joins?

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.