Hi there taocg,
and a warm welcome to these forums. 
Try it like this...
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="language" content="english">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title></title>
<style type="text/css">
.disabled {
background-color:#d4d0c8;
}
</style>
<script type="text/javascript">
function disableEnable(){
obj=document.getElementById('anotherid');
document.getElementById('noneid').onchange=function() {
this.value=='mysite'?
(obj.disabled=true,obj.className='disabled'):
(obj.disabled=false,obj.className='');
}
}
if(window.addEventListener){
window.addEventListener('load',disableEnable,false);
}
else {
if(window.attachEvent){
window.attachEvent('onload',disableEnable);
}
}
</script>
</head>
<body>
<form id="form1" method="post" action="#">
<div>
<label>
<select name="none" id="noneid" >
<option value="none">None</option>
<option value="mysite">Mysite</option>
</select>
</label>
<label>
Another
<input type="text" name="another" id="anotherid">
</label>
</div>
</form>
</body>
</html>
coothead
Bookmarks