JavaScript
  Home arrow JavaScript arrow Page 2 - EXT JS Working With Live Data
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

EXT JS Working With Live Data
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2009-07-20

    Table of Contents:
  • EXT JS Working With Live Data
  • Starting the JavaScript
  • Defining the DataStore
  • Creating the GridPanel

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    EXT JS Working With Live Data - Starting the JavaScript


    (Page 2 of 4 )

    The majority of our coding will be done with JavaScript. Let’s look at initializing and invoking our GridPanel, which is what will be used to display the data we’re going to pull from our database. The third script tag in our document is currently empty; within it we can start with the following JavaScript:


    //set local blank image

    Ext.BLANK_IMAGE_URL = 'ext/resources/images/default/s.gif';

     

    //define function to be executed when page loaded

    Ext.onReady(function() {


    //rest of code to go in here…


    });


    The first thing we do is set the location of a local blank image using the BLANK_IMAGE_URL constant. This file is used throughout the library, so if we don’t use a local version, one will be downloaded from the Ext domain, which could worsen the performance of your application.

    Following this we use the onReady() method, which allows us to specify an anonymous function that should be executed as soon as the DOM is in a usable state. The rest of our code can now sit happily within this anonymous function.

    The Ext-Js GridPanel component, which is the foundation of this example, is similar in structure to a standard HTML table, although that is where the similarities begin and end. GridPanel displays data in a table-like format of rows and columns, but it is presented in an extremely attractive manner and contains a lot of built-in advanced functionality like row selection, zebra striping, column sorting and remote data.

    More JavaScript Articles
    More By Dan Wellman


     

    JAVASCRIPT ARTICLES

    - Using jQuery to Preload Images with CSS and ...
    - Using Client-Side Scripting to Preload Image...
    - Removing Non-Semantic Markup when Preloading...
    - Using the Display CSS Property to Preload Im...
    - Preloading Images with CSS and JavaScript
    - Scaling and Moving Web Page Elements with th...
    - Fading, Hiding and Sliding HTML Elements wit...
    - Toggling CSS Properties with the GX JavaScri...
    - Cancel, Queue and Pause Animations with the ...
    - Producing Elastic Effects with the GX JavaSc...
    - Moving Divs Diagonally with the GX JavaScrip...
    - Moving Elements Vertically and Horizontally ...
    - Making Bouncing Effects in Parallel with the...
    - Creating Bouncing Effects with the GX JavaSc...
    - Manipulating Background Colors with the GX J...







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 7 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek