View Full Version : select menu on click div appears

10-27-2006, 03:17 AM
hey people,
doesn anyone know a javascript code to make div tags appear and disapear on click i have 3 items in a select menu, and when i click each one i would like to have some text change on the page, ive googled it for about an hour and couldnt find the right thing i am looking for.

any help greatly appreciatiated

Mr J
10-27-2006, 02:14 PM
Give this a try

<script type="text/javascript">

"Hello World",
"Some Dummy Text",
"And a bit more for luck" // no comma at the end of last index

function showText(n){


<div id="display"></div>

<select id="s1" onchange="showText(this.selectedIndex)">