Код:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title>Calculator</title>
<style type="text/css" media="screen, projection">
@import url(style/main.css);
</style>
<script type="text/javascript">
<!--
function addCode (text) {
****if(text == "ForexGroup") {
*document.getElementById('instrument').innerHTML = 'Валютная пара:';
*document.getElementById('ForexGroup').style.display = 'block';
*document.getElementById('FuturesGroup').style.display = 'none';
*document.getElementById('StocksGroup').style.display = 'none';
****}
****else if(text == "FuturesGroup") {
*document.getElementById('instrument').innerHTML = 'Название контракта:';
*document.getElementById('ForexGroup').style.display = 'none';
*document.getElementById('FuturesGroup').style.display = 'block';
*document.getElementById('StocksGroup').style.display = 'none';
****}
****else if(text == "StocksGroup") {
*document.getElementById('instrument').innerHTML = 'Название акции:';
*document.getElementById('ForexGroup').style.display = 'none';
*document.getElementById('FuturesGroup').style.display = 'none';
*document.getElementById('StocksGroup').style.display = 'block';
****}
****else{
*document.getElementById('instrument').innerHTML = '';
*document.getElementById('ForexGroup').style.display = 'block';
*document.getElementById('FuturesGroup').style.display = 'block';
*document.getElementById('StocksGroup').style.display = 'block';
****}
}
// -->
</script>
</head>
<body>
<div id="MainPage">
<div id="Calculate">
****<p class="caption">
*Калькулятор трейдера:
****</p>
<div id="LeftColumn">
<script type="text/javascript">
function checkPositionCalc(form)
{
****var err = '';
****if(isNaN(parseFloat(form.lot.value))) {
*err = 'Неверно указан объем';
****}
****if(!(document.getElementById('cmdBuy').checked || document.getElementById('cmdSell').checked)) {
*err = 'Пожалуйста, выберите тип сделки';
****}
****if(err.length) {
*alert(err);
*return false;
****}
****return true;
}
</script>
<form name="positionCalc" action="index.php" method="post" onsubmit="return checkPositionCalc(this);">
<table>
<tr>
* *<td>Инструмент:</td>
* *<td></td>
* *<td>
****<select name="instr" class="user" onchange="javascript:addCode(this.value)">
*<option value="" selected="selected">Выбрать...</option>
*<option value="ForexGroup" *>Forex</option>
*<option value="FuturesGroup" >Futures</option>
*<option value="StocksGroup" >Stocks</option>
****</select>
****</td>
</tr>
<tr>
****<td colspan="3"></td>
</tr>
<tr>
* *<td>
*<div id="instrument">
* *</div>
****</td>
* *<td></td>
* *<td>
****<select name="pair" class="user">
*<option value="" selected="selected">Выбрать</option>
*<optgroup label="Forex" id="ForexGroup">
*****<option value="EURUSD" >EURUSD</option>
*****<option value="USDJPY" >USDJPY</option>
*****<option value="GBPUSD" >GBPUSD</option>
*****<option value="USDCHF" >USDCHF</option>
*</optgroup>
*<optgroup label="Futures" id="FuturesGroup">
*****<option value="DX" >Индекс доллара</option>
*</optgroup>
*<optgroup label="Stocks" id="StocksGroup">
*****<option value="SAMAG" >Advanced Magn.</option>
*****<option value="SAEPI" >AEP Ind.</option>
*</optgroup>
****</select>
****</td>
</tr>
<tr>
****<td colspan="3"></td>
</tr>
<tr>
* *<td>Тип сделки:</td>
* *<td></td>
* *<td>
*<input type="radio" name="cmd" value="buy" id="cmdBuy" */>
*<label for="cmdBuy">buy</label>
*
*<input type="radio" name="cmd" value="sell" id="cmdSell" */>
*<label for="cmdSell">sell</label>****</td>
</tr>
<tr>
****<td colspan="3"></td>
</tr>
<tr>
* *<td>Объем (lots):</td>
* *<td></td>
* *<td><input type="text" name="lot" value="" /></td>
</tr>
<tr>
****<td colspan="3"></td>
</tr>
<tr>
* *<td>Цена открытия:</td>
* *<td></td>
* *<td><input type="text" class="user form" name="open" value="" /></td>
</tr>
<tr>
****<td colspan="3"></td>
</tr>
<tr>
* *<td>Цена закрытия:</td>
* *<td></td>
* *<td><input type="text" class="user form" name="close" value="" /></td>
</tr>
<tr>
****<td colspan="3"></td>
</tr>
<tr>
* *<td>Подсчитать:</td>
* *<td></td>
* *<td><input type="image" src="images/but.gif" /></td>
</tr>
</table>
</form>
</div>
</div>
</div>
</body>
</html>
С перво частью вопроса разобрался
Но вот в ИЕ, отказывается напрочь скрывать <optgroup ... id=...
Кто нить знает как через джаву блин сделать чтобы скрывались группы