Hi. I've got a JavaScript running 2 ".getElementById('').style"
changes. Both work perfectly in FF, but the first one doesn't work in IE7.
Appreciate all help :)
First SourceCode:
function ingen() {
document.getElementById('merInfo1').style.display='none';
document.getElementById('merInfo2').style.display='none';
document.getElementById('merInfo3').style.display='none';
document.getElementById('merInfo4').style.display='none';
document.getElementById('merInfo5').style.display='none';
document.getElementById('merInfo6').style.display='none';
document.getElementById('merInfo7').style.display='none';
}
HTML:
<span class="enkeltSkjema" id="avtaleInput">
<select name="radio1" id="radio1">
<option value="1" onClick="ingen()">lorem</option>
<option value="2" onClick="some()">lorem</option>
<option value="3" onClick="other()">lorem</option>
<option value="4" onClick="func()">lorem</option>
<option value="5" onClick="tion()">lorem</option>
<option value="6" onClick="names()">lorem</option>
<option value="7" onClick="goes()">lorem</option>
<option value="8" onClick="here()">lorem</option>
</select>
</span>
<span class="enkeltSkjema" id="merInfo">
<span id="merInfo1" name="merInfo1"></span>
<span id="merInfo2" name="merInfo2"></span>
<span id="merInfo3" name="merInfo3"></span>
<span id="merInfo4" name="merInfo4"></span>
<span id="merInfo5" name="merInfo5"></span>
<span id="merInfo6" name="merInfo6"></span>
<span id="merInfo7" name="merInfo7"></span>
</span>
Second, works fine in IE:
function levAdresse() {
if (document.getElementById('egenLevAdr').checked == true) {
document.getElementById('levAdrBox').style.display='block';
}
else {
document.getElementById('levAdrBox').style.display='none';
}
}
HTML:
<div id="levAdrBox">
<div id="levAdr">Field
<span class="" id="levAdrInput"><input type="text" id="text12" name="text12" /></span>
</div>
<div class="" id="levPostSted"> field:*
<span class="" id="levPostStedInput">
<input type="text" id="text18" name="text18" />
<span class="" id="levPostNr">field:*
<span class="" id="levPostNrInput">
<input type="text" id="text17" name="text17" />
</span>
</span>
</span>
</div>
</div>