handleamericanterm
Programmer
Ok, basically I'm using this code in an attempt to get the text in the div in the tiptext function to change:
<script type="text/javascript">
var textBlocks = new Array(
'Message 0',
'Message 1',
'Message 2',
'Message 3');
function changetext(elemid) {
var ind = document.getElementById(elemid).selectedIndex;
document.getElementById("display").innerHTML=textBlocks[ind];
}
</script>
<select name="type" id="search" onchange="changetext('search');">
<option value="0">Mess 0</option>
<option value="1">Mess 1</option>
<option value="2">Mess 2</option>
<option value="3">Mess 3</option>
</select>
<img src="images/layout/icons/help.gif" alt="What do these terms mean?" onMouseover="tiptext('<div id=display>Message 0</div>');" onMouseout="closetip()">
Quick note, the tiptext('') function is a tooltip that CAN use HTML normally. However this time, when the div is inside the tiptext() function, it doesn't change the text inside the div. If the div is removed from the tiptext() function it works as it should. Is there any way I can get this to work?
P.S - 'display' doesn't have to be a div, it can also be a <span> if that helps at all.
P.P.S - I'll check back very regularly, hope you guys can help.
<script type="text/javascript">
var textBlocks = new Array(
'Message 0',
'Message 1',
'Message 2',
'Message 3');
function changetext(elemid) {
var ind = document.getElementById(elemid).selectedIndex;
document.getElementById("display").innerHTML=textBlocks[ind];
}
</script>
<select name="type" id="search" onchange="changetext('search');">
<option value="0">Mess 0</option>
<option value="1">Mess 1</option>
<option value="2">Mess 2</option>
<option value="3">Mess 3</option>
</select>
<img src="images/layout/icons/help.gif" alt="What do these terms mean?" onMouseover="tiptext('<div id=display>Message 0</div>');" onMouseout="closetip()">
Quick note, the tiptext('') function is a tooltip that CAN use HTML normally. However this time, when the div is inside the tiptext() function, it doesn't change the text inside the div. If the div is removed from the tiptext() function it works as it should. Is there any way I can get this to work?
P.S - 'display' doesn't have to be a div, it can also be a <span> if that helps at all.
P.P.S - I'll check back very regularly, hope you guys can help.