JavaScript
  Home arrow JavaScript arrow Finishing a List Generator with JavaScript
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

Finishing a List Generator with JavaScript
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2006-12-12

    Table of Contents:
  • Finishing a List Generator with JavaScript
  • Listing the complete source code for the previous list generator
  • Displaying the source code for list-wrapped links
  • Listing the application's complete source code

  • 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


    Finishing a List Generator with JavaScript


    (Page 1 of 4 )

    Looking for a comprehensive set of tutorials on how to develop a JavaScript application capable of generating list-wrapped links? Then, look no further, because your search is over. Welcome to the final part of the series “Building a list generator with JavaScript.” In these two articles, you’ll learn how to build a simple JavaScript program that creates a set of customizable links, wrapped by an unordered list, which can be copied and pasted straight into your favorite text editor.

    Assuming that you've already read the previous installment of this series, you'll recall that I went through the development of an intuitive user interface. It allowed users to enter different options to create those popular list-wrapped links. The interface initially included three basic input elements for controlling the number of list items to be generated, as well as for supplying the respective class and ID attributes for the referenced list.

    Besides creating this simple front end, I defined an important JavaScript function, called "displayListGenerator()", aimed at displaying dynamically the set of input boxes required for entering the values corresponding to the "href" attribute of each link, as well as for supplying the pertinent labels.

    Logically, this relevant function was triggered by an "onchange" event handler, attached to the initial select box that was provided with the initial user interface. This means that the complete front end that belongs to this application is generated by a few progressive steps, according to the list options selected by the user.

    So far, so good. In its current incarnation, the list generator is only capable of displaying the mentioned list controls; it lacks a proper area inside the web document where the all the generated (X)HTML markup that corresponds to the list-wrapped links can be copied and pasted. Thus, the question that comes now is: how can this process be performed?

    Well, to provide the original application with the ability to display the complete source code for the mentioned links, in this final part of the series I'm going to define another crucial JavaScript function. It will append a simple text area dynamically to the web document tree, where the appropriate source code for the wrapped links can be copied and pasted into any text editor.

    The challenge ahead of us seems rather simple, but interesting. Therefore, let's move on quickly and get this JavaScript-based list generator completed!

    More JavaScript Articles
    More By Alejandro Gervasio


       · Over this final part of this series, the list generator is finally completed, since...
     

    JAVASCRIPT ARTICLES

    - Comparing Fields and Customizing Error Messa...
    - Checking Numbers and File Extensions with jQ...
    - Validating Digits and Dates with jQuery`s Va...
    - Validating Ranges, Emails, and URLs with jQu...
    - More Uses for the jQuery Tooltip Plug-in`s b...
    - Building Image-Based Tooltips with the jQuer...
    - Using the jQuery Tooltip Plug-in`s bodyHandl...
    - Using Rangelength, Min and Max with the Vali...
    - Using Minlength and Maxlength with the Valid...
    - Modifying Tooltip Coordinates with the jQuer...
    - Applying a Fade Out Effect with the jQuery T...
    - Tracking Mouse Movements with the jQuery Too...
    - Checking Online Forms with the Validator jQu...
    - Nested JavaScript Functions as Objects
    - The jQuery Tooltip Plug-in







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