Website Design Edmonton       Website Design Feedback       Website Design Sitemap     Contact Website Design Company
Website Designers R Us - Home
How to Create a Dynamic Web Page Code for Drop down Box and Text Area

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.

 

Return to Listing

Website Designers R us is based in Canada with branch office in Los Angeles, California. We are website developer & designer and have already created many ecommerce website design for USA, UK, and European countries. Our website development & creation is based on proper tools and techniques considering search engine optimization of the website.
 Home          ::             About Us          ::             Support            ::             Services            ::             Link Partners          ::             Contact

Copyright © 2006-2011 Website Designers R Us, a DOT Specialist Company. All rights reserved.