search the site  

Enter search terms:


subscribe to newsletters   WebReference.com logo   WebReference.com
dev the Web
tip archive  •   about  •   contact  •   jobs  •   sitemap


[next]

How to Create an Ajax Autocomplete Text Field - Part 4

By Rob Gravelle

Digg This Add to del.icio.us

Lotus Notes Developer
AMS Staffing Solutions
US-OH-Columbus

Justtechjobs.com Post A Job | Post A Resume

In part 3 of the series, we added the brains behind our Autocomplete text field's search functionality. It handles the requests from the browser and returns whatever funds match the criteria. Now it's time to turn our attention to the Web components. We need to create six files in total:

This week we'll create the CSS file, since it, along with the JavaScript file, need to be linked to the AutocompleteSearch.jsp page.

Create the AutocompleteList.css File

To create a new CSS file, we have to right-click on the "WebContent" folder or an any item below it to access the popup menu. From there, we have to click on "Other..." because the CSS file type isn't on the "New" submenu (See Figure 1).

Surely there must be an easier way to access our Web components. There is! The "Customize Perspective" dialog has exactly what we're looking for. We can access this screen from the "Window" menu on the toolbar or from the right-click popup menu on the "Java EE" Perspective tab button in the top right-hand corner (See Figure 2).

On the "Shortcuts" tab, select the word "Web" in the "Shortcut Categories" tree to bring up the available items in the "Shortcuts" window. Don't select the checkbox because that will select everything in the "Shortcuts" pane. The items we need are: CSS, HTML, JavaScript and JSP (See Figure 3).

Now, you can access the shortcut items by selecting "New" from the toolbar (See Figure 4).

Alternatively, you can use the hotkeys "Alt+Shift+N" combination to bring up the "New" submenu directly underneath the selected folder (or the cursor, if you're working in the editing window) (See Figure 5).

Click "CSS" to open the "New Cascading Style Sheet" dialog (See Figure 6).

Enter the "File name" of "AutocompleteList.css" and click on the "Finish" button to add the new file in the WebContent folder and open the editor. We can skip the "Next" button because we don't need a particular template:

The CSS file is where we define the appearance of the Autocomplete list. In fact, CSS (Cascading Style Sheets), were created to separate appearance information from a Web page's content. That allows us to maintain each separately, much like the middle and front-end tiers decouples the logic and presentation in programs.


[next]

Recent Articles

WebReference.com site name
Anatomy of an Ajax Application
Popular JavaScript Framework Libraries: An Overview
Controllers: Programming Application Logic - Part 2
internet.com site name
MS Access and MySQL
Cisco AutoQoS: VoIP QoS for Mere Mortals
While VoIP Adoption Explodes in Enterprise, Carrier Spending Lags




JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: BitLocker Encryption on Windows Server 2008
Go Parallel Article: Intel Thread Checker, Meet 20 Million LOC
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
Tripwire Whitepaper: Seven Practical Steps to Mitigate Virtualization Security Risks
Internet.com eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES