DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Full-Stack Observability Essentials: Explore the fundamentals of system-wide observability and key components of the OpenTelemetry standard.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • Reversing an Array: An Exploration of Array Manipulation
  • Low Code/No Code Testing Approach for Salesforce Testing
  • Unlocking the Potential of Binary Search Trees with C# Programming
  • Required Capabilities in Self-Navigating Vehicle-Processing Architectures

Trending

  • Revolutionizing Software Testing
  • Vector Database: A Beginner's Guide
  • What Is GitOps?
  • Researcher Finds GitHub Admin Credentials of Car Company Thanks to Misconfiguration
  1. DZone
  2. Data Engineering
  3. Data
  4. ExtJS Customized QuickTip Example

ExtJS Customized QuickTip Example

Tousif  Khan user avatar by
Tousif Khan
·
Sep. 18, 14 · Interview
Like (2)
Save
Tweet
Share
10.18K Views

Join the DZone community and get the full member experience.

Join For Free

extjs comes with a singleton class ext.quicktips (alternate name: ext.tip.quicktipmanager ) which provides attractive and customizable tooltips for any element. the quicktips singleton is used to configure and manage tooltips globally for multiple elements in a generic manner.

today i am going to demonstrate how we can use this quicktips to create a customized instruction text which will help our user to enter valid form data in form text field.

to demonstrate this, i am creating a simple login form and n this form we will place a instruction text with image (displayfield component of ext library), on click or hover of that image we will display a customized ext.quicktip with field validation instructions.

ext.onready(function () {
  ext.quicktips.init();

  var qtip = "<p style='color:blue;font-weight:bold;'>follow the below instruction to enter valid username</p><dl><dt><b style='color:red;'>lenght:</b></dt><dd>- minimum: 4 char</dd><dd>- maximun: 12 char</dd><dt><b style='color:red;'>character:</b></dt><dd>- atleast one numeric char</dd><dd>- special char not allowed</dd>";

  ext.create('ext.form.panel', {
    width: 400,
    frame: true,
    title: 'login form - techzoo',
    padding: 10,
    fielddefaults: {
      msgtarget: 'side',
      labelwidth: 75
    },
    defaulttype: 'textfield',
    defaults: {
      anchor: '98%'
    },
    items: [{
      xtype: 'displayfield',
      value: '<p>please make sure you follows all the form validation instruction to successfully submit the form.<img id= "questionqtip" src="images/question_white.png" /></p>',

      afterrender: function() {
        var me = this;
        me.mon(ext.get('questionqtip'),
          'click',
          function(e,t) {e.stopevent();},
          me
        );
      },
      listeners: {
        afterrender: function(me, e){
          ext.quicktips.register({
            dismissdelay: 5000,
            target: 'questionqtip',
            text  : qtip,
            cls   : 'qbodystyle',
            width : 200
          });
          ext.get('questionqtip').dom.style.cursor = 'help';
        }
      }
    },{
      fieldlabel: 'first name',
      name: 'first',
      allowblank: false
    },{
      fieldlabel: 'last name',
      name: 'last',
      allowblank: false
    }],
    dockeditems: [{
      xtype: 'toolbar',
      dock: 'bottom',
      ui: 'footer',
      items: [{
        xtype: 'tbfill'
      },{
        text: 'cancel'
      },{
        text: 'submit form'
      }]
    }],
    renderto: 'output'
  });
});

click of mouseover to question image and you will see following output.

output:

download source


Form (document) Element Data (computing) Download

Published at DZone with permission of Tousif Khan, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Reversing an Array: An Exploration of Array Manipulation
  • Low Code/No Code Testing Approach for Salesforce Testing
  • Unlocking the Potential of Binary Search Trees with C# Programming
  • Required Capabilities in Self-Navigating Vehicle-Processing Architectures

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: