RobB wrote:
ia*********@fin.gov.on.ca wrote: I have an interesting delema. I have a two-frame window. The top
frame has a listing of years and months. The user needs to select
a year, then a month - which will then bring up a page in the bottom
frame.
I know there are other ways of doing this (ie two drop downs) - but I'd like to have the full row of years and months always showing...
(snip)
A 'drop-down' doesn't really have to 'drop-down' \:D -
...set the size attribute and it can become a 'sit-there', so to
speak.
Here's an idea...
(snip)
OK, wanted to try this without any JS required, after all, this is a js
ng.
Assuming you're using cgi/php/asp to redirect the "bottom" frame, this
should do...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/str**ict.dtd">
<html>
<head>
<title>Mr. Pither</title>
<style type="text/css">
#menu {
position: relative;
width: 124px;
height: 198px;
margin: 50px;
border: 3px #888 double;
background: #ccc;
}
#month {
position: absolute;
left: 0;
top: 0;
clip: rect(3px 36px 194px 3px);
background: #ccc;
cursor: pointer;
}
#year {
position: absolute;
left: 44px;
top: 40px;
clip: rect(3px 36px 114px 3px);
background: #ccc;
cursor: pointer;
}
#sub {
position: absolute;
left: 96px;
top: 92px;
width: 20px;
font-size: 12px;
padding: 0 0 1px 0;
border: none;
background: #fff;
cursor: pointer;
}
</style>
</head>
<body>
<form action="foo.html" method="get" target="bottom">
<div id="menu">
<select id="month" name="month" size="12"
onmouseover="this.style.background='#499';
this.style.color='#fff'"
onmouseout="this.style.background='#ccc';
this.style.color='#000'">
<option value="Jan" selected="selected">Jan</optio*n>
<option value="Feb">Feb</option>
<option value="Mar">Mar</option>
<option value="Apr">Apr</option>
<option value="May">May</option>
<option value="Jun">Jun</option>
<option value="Jul">Jul</option>
<option value="Aug">Aug</option>
<option value="Sep">Sep</option>
<option value="Oct">Oct</option>
<option value="Nov">Nov</option>
<option value="Dec">Dec</option>
</select>
<select id="year" name="year" size="7"
onmouseover="this.style.background='#499';
this.style.color='#fff'"
onmouseout="this.style.background='#ccc';
this.style.color='#000'">
<option value="1999" selected="selected">1999</option>
<option value="2000">2000</option>
<option value="2001">2001</option>
<option value="2002">2002</option>
<option value="2003">2003</option>
<option value="2004">2004</option>
<option value="2005">2005</option>
</select>
<input type="submit" id="sub"
value="go"
onmouseover="this.style.background='#499';
this.style.color='#fff'"
onmouseout="this.style.background='#fff';
this.style.color='#000'" />
</div>
</form>
</body>
</html>