<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Selectbox</title>
<style type="text/css">
Body
{
font: 9pt "Segoe UI";
}
</style>
<script type="text/javascript">
doCheck = function(Obj)
{
var Warning = document.getElementById(Obj.id+':warning');
if(typeof(Warning.style.opacity) == 'undefined' || Warning.style.opacity == '')
{
Warning.style.filter = 'alpha(opacity=0)';
Warning.style.opacity = 0;
}
if(Warning.style.display != 'none' || !Obj.selectedIndex)
{
clearTimeout(Warning.Interval);
Warning.style.display = '';
Warning.Interval = setInterval("doOpacity('"+Obj.id+"', "+(!Obj.selectedIndex ? 1 : -1)+")", 50);
}
}
doOpacity = function(ID, Wat)
{
var Warning = document.getElementById(ID+':warning');
var Huidig = (Warning.style.opacity * 10 + Wat) * 10;
Warning.style.filter = 'alpha(opacity=' + Huidig + ')';
Warning.style.opacity = Huidig / 100;
if(Huidig <= 0 || Huidig >= 100)
{
clearInterval(Warning.Interval);
if(!Huidig)
Warning.style.display = 'none';
}
}
</script>
</head>
<body>
<select onchange="doCheck(this);" id="selectbox">
<option>Uit</option>
<option selected="selected">Beide</option>
<option>Enkel optie 1</option>
<option>Enkel optie 2</option>
<option>Beide</option>
</select>
<div id="selectbox:warning" style="display: none; margin-top: 10px; padding: 5px; background-color: #FFC4C4; border: 1px solid; color: #CC0000;">Deze optie is niet aanbevolen</div>
<br /><br />
<script type="text/javascript">
doCheck(document.getElementById('selectbox'));
// checken op moment van laden ivm autocomplete reload
</script>
<select onchange="doCheck(this);" id="selectbox-nummero2">
<option>Uit</option>
<option selected="selected">Beide</option>
<option>Enkel optie 1</option>
<option>Enkel optie 2</option>
<option>Beide</option>
</select>
<div id="selectbox-nummero2:warning" style="display: none; margin-top: 10px; padding: 5px; background-color: #B7DBFF; border: 1px solid; color: #06C;">Je hebt deze optie geselecteerd, maar dat kan je beter niet doen, anders kom ik je achterna en sla ik je :')</div>
<script type="text/javascript">
doCheck(document.getElementById('selectbox-nummero2'));
// checken op moment van laden ivm autocomplete reload
</script>
</body>
</html>