View Full Version : How to open page with specific list item showing

08-31-2006, 11:53 PM
I have a client who wants to have a list of speakers, past, present, and future as part of a page. When one goes to the page he wants the list to scroll to whomever the current speaker is. Is this possible? If so, please point me in the right direction.

I imagine that this list would be housed in a div with overflow auto, the current speaker would have an ID on the list item, and the body would have an onLoad function to do it.

09-01-2006, 07:54 PM
do you want a dropdown list, or more of a ASP style listview.

09-01-2006, 08:25 PM
You should always say 'thank you' or at least say 'please' :)

The client wants to explore all options, so long as when you go to the area on the page with the speakers the current speaker is the first thing you see. The client envisions a little "Speakers" section on the page with an attractive vertical scrollbar. I don't want to do it in Flash because the client needs to be able to update the speakers. I'm not sure if frames are the way to go or if there is a simple javascript alternative that also allows a customizable scrollbar.

09-01-2006, 09:01 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


<script language="JavaScript" type="text/javascript">

function Sort(id,nme){
var obj=document.getElementById(id);
var ds=obj.childNodes;
var ary=[];
for (var zxc0=0;zxc0<ds.length;zxc0++){
if (ds[zxc0].tagName=='DIV'&&!ds[zxc0].title.match(nme)){
for (var zxc1=0;zxc1<ary.length;zxc1++){

<body onload="Sort('Tst1','Harry');">
<div id="Tst1"style="position:relative;overflow:auto;width:300px;height:200px;border:solid black 1px;" >
<div title="Tom" style="position:relative;height:200px;border:solid black 1px;background-color:red;" >
<div title="Dick" style="position:relative;height:200px;border:solid black 1px;background-color:green;" >
<div title="Harry" style="position:relative;height:200px;border:solid black 1px;background-color:blue;" >

<input type="button" name="" value="Tom" onclick="Sort('Tst1','Tom');" >
<input type="button" name="" value="Dick" onclick="Sort('Tst1','Dick');" >
<input type="button" name="" value="Harry" onclick="Sort('Tst1','Harry');" >


09-01-2006, 09:38 PM
Once again you come through, vwphillips. I would name my firstborn child after you, but I'm not planning to have any. I'll see if I can talk my brother into changing one of his kids' names.