Franklin, MA | Schools |

| Index | Search   

  FHS | Horace Mann | Remington | Annie Sullivan | Davis Thayer | Kennedy | Keller | Jefferson | Oak | Parmenter | Brick | ECDC | Lifelong  | Public | All Schools   
  QuickSite  
Franklin High School > Departments and Faculty > Business/Computer Technology > Designing Web Pages

Drop Down Menu with Changing Info


<table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100%"><form name="ddmessage"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%"><select name="selectbox" size="1" onChange="changecontent(this)">

<option selected value=" What is JavaScript?"> What is JavaScript?</option>

<option value="Why learn JavaScript?"> Why learn JavaScript?</option>

<option value=" The difference between JavaScript and Java"> The difference between Java and JavaScript</option>

<option value=" What is DHTML?"> What is DHTML?</option>

</select><br> </td> </tr> <tr> <td width="100%"><qs-textarea rows="8" name="contentbox" cols="35" wrap="virtual"></qs-textarea><br> </td> </tr> </table> </form> </td> </tr> </table>

<script language="JavaScript">

//change contents of message box, where the first one corresponds with the first drop down box, second with second box etc var thecontents=new Array()

thecontents[0]=' JavaScript is a scripting language developed by Netscape to add interactivity and power to web documents. Examples of JavaScript include live clocks, rollover effects, scrollers, form validations, and so on. JavaScript differs from most other programming languages in that it is relatively easy to master, even for people who have absolutely no programming experiences whatsoever.'

thecontents[1]=' The first few words that come to mind are: "Freedom baby, freedom!" With html, you are restricted to creating static, non interactive webpages. This, in today\'s internet standards, is unacceptable. With JavaScript, you can change that. Imagine being able to break free and allow your creativity to dictate what you put on your webpage, instead of the other way round.'

thecontents[2]=' Java is completely different from JavaScript-It\'s a lot more powerful, more complex, and unfortunately, a lot harder to master. It belongs in the same league as C, C++, and other more complex languages. Also, you need to compile a Java program before you can run it, whereas with JavaScript, no compilation is needed-simply open up a text editor, type it, save it, and your browser is ready to run it!'

thecontents[3]=' DHTML, or Dynamic HTML, is a new web technology that enables elements inside your web page to be, well, dynamic. Things once considered unchangeable once the page has loaded, such as text, page styles (font color, size etc), element position, etc, can now all be changed dynamically, thanks to DHTML. It brings your web pages one step closer to how things look inside your television, where images appear and disappear, text flies in and out, and content move around freely inside the screen.'

//don't edit pass this line

function changecontent(which){ document.ddmessage.contentbox.value=thecontents[which.selectedIndex] }

document.ddmessage.contentbox.value=thecontents[document.ddmessage.selectbox.selectedIndex] </script>

15664  
Updated: Jan 6, 2006  



[Franklin] [Schools] [Index] [Search]

[QuickSite

This Web site has been developed for the benefit of residents, schools, businesses, and anyone who is interested in the town. It is a work-in-progress. We welcome your questions, comments, and feedback on how we can make it more useful and enjoyable to use. Please contact the Webmaster.

"Genius without education is like silver in the mine." - Benjamin Franklin

Copyright ©1995-2008 Town of Franklin, Massachusetts, All Rights Reserved. This website and its contents are the exclusive property of Town of Franklin.  No contents may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopy, recording, or any information storage and retrieval system, without permission in writing from the Town Administration. Permission to use includes acknowledging the source of the material. Click here to apply for permission.