HTML
  Home arrow HTML arrow Page 2 - How to Create a Dynamic Web Page
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? 
HTML

How to Create a Dynamic Web Page
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 53
    2004-06-14

    Table of Contents:
  • How to Create a Dynamic Web Page
  • Code for Drop-down Box and Text Area
  • Making the HTML Elements Interact
  • Completed File

  • 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


    How to Create a Dynamic Web Page - Code for Drop-down Box and Text Area


    (Page 2 of 4 )

    The code used is all my own, so feel free to tweak it, customize it and build on it in any way you like. I’ve used a simple name and address list as an example here, more to demonstrate usage than as a recommended employment, but its use is limited only by your imagination. It doesn’t have to be confined to the web either; you can have the page saved on your desktop at home, or on a shared volume on the office network.

    To begin with open Notepad (or your HTML editor of choice), and add the following code to a text file: 

    <html>
    <head>
    <title></title>
    </head>
    <body>
    </body>
    </html>

    Save it as htmlTemplate.txt, and from now on, you can just open the template file, add your code between the relevant tags and save it under a different name. If you produce a lot of HTML in Notepad, it will save you time.

    Open your template file or add the above tags to a blank page. Give the page a title and let’s get the basic HTML for the page laid out. You will be using two objects mainly: a drop-down or selection box for visitors of the page to choose the content that gets displayed, and a text area to exhibit information based on the selection.

    To set the drop-down box, add the following section of code in between the <body> tags:

    <select >
    <option>Please select</option>
    <option>Mr Smith</option>
    <option>Mrs Bloggs</option>
    <option>Mr Doe</option>
    <option>Mrs Jones</option>
    <option>Mr Spencer</option>
    <option>Mr Field</option>
    <option>Ms Reed</option>
    <option>Mr Waters</option>
    <option>Mrs Frank</option>
    <option>Mr Green</option>
    </select>

    To create the text area, add this code below to selection box code shown above:

    <form>
    <textarea rows="12" cols="60"> </textarea>
    </form>

    The rows and cols properties of the <textarea> element dictate the size of the text area, each row is a normal line height, and each column is normal character width. 

    More HTML Articles
    More By Dan Wellman


       · I tried your tutorial following the instructions and it didn't work. I then decided...
       · I also entered all the code, I did make several typo's but it still did not work. I...
       · The drop down box was populated, but after selecting each item, the textbox did not...
       · I tryed Mozilla and Explorer; neither worked, so it is not a browser issue.
       · Thanks for reading everyone, but please note the date that this tutorial was...
       · the code works perfectly fine for me , pretty helpful for beginners
       · What OS are you using and what browser and version? - Thanks Helen
     

    HTML ARTICLES

    - Comparing Browser Response to Active Client ...
    - Testing Browser Response to Active Client Pa...
    - Active Client Pages: Completing the Code for...
    - ACP and Browsers: Setting up an Example
    - How Browsers Respond to Active Client Pages
    - Completing a Tree with Active Client Pages
    - HTML Form Verification and ACP
    - Building an ACP Tree
    - Completing an ACP 3D HTML Table Image Gallery
    - Building an ACP 3D HTML Table Image Gallery
    - A Multiple Page Image Gallery with Active Cl...
    - Building an Image Gallery with Active Client...
    - Concluding a Menu for All Browsers
    - A Vertical Menu for All Browsers
    - Downloading Long HTML Pages with ACP







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT