Code: Select all
#...
<head>
#...
<script type="text/javascript">
function customCheck() {
var select = GkForm.GkCodeType.options[GkForm.GkCodeType.selectedIndex];
var hidden = document.getElementById('customWrap');
if(select.value == 'custom'){
hidden.style.display = '';
} else {
hidden.style.display = 'none';
}
}
</script>
</head>
#...
<form action="" method="post" name="GkForm" id="GkForm">
<select name="GkCodeType" onchange="customCheck()">
<option value="random">Random</option>
<option value="custom">Custom</option>
</select>
<div id="customWrap" style="display: none;">
<input type="text" maxlength="20" name="customCode" />
</div>
</form>
#...