PDA

View Full Version : drop down list


jscript_newbie
08-30-2002, 03:25 AM
hi.. can someone out there pls help and teach me how to create a drop down list and upon clicking, the scrollers automatically scroll to the desired part of the document.


Thanks a lot! :)

adios
08-30-2002, 03:50 AM
Easiest way:

<html>
<head>
<title>untitled</title>
</head>
<body>
<form>
<strong>Go To</strong>
<select onchange="window.location=this[this.selectedIndex].value">
<option value="#sect1">section 1</option>
<option value="#sect2">section 2</option>
<option value="#sect3">section 3</option>
<option value="#sect4">section 4</option>
</select>
</form>
<a name="sect1">
<hr />
<div style="font:200 48px arial;color:olive;">
section 1<br>section 1<br>section 1<br>section 1<br>section 1<br>section 1<br>
</div>
<hr />
<a href="#">top</a>
<a name="sect2">
<hr />
<div style="font:200 48px arial;color:tan;">
section 2<br>section 2<br>section 2<br>section 2<br>section 2<br>section 2<br>
</div>
<hr />
<a href="#">top</a>
<a name="sect3">
<hr />
<div style="font:200 48px arial;color:green;">
section 3<br>section 3<br>section 3<br>section 3<br>section 3<br>section 3<br>
</div>
<hr />
<a href="#">top</a>
<a name="sect4">
<hr />
<div style="font:200 48px arial;color:coral;">
section 4<br>section 4<br>section 4<br>section 4<br>section 4<br>section 4<br>
</div>
<hr />
<a href="#">top</a>
</body>
</html>