Hopefully someone can help.
I have a scrollbar/slider on my page that scrolls through "titles" from an array. The array is populated from a database. When the user clicks on one of the "titles" the message that accompanies it is displayed in <div> underneath the scroller. This works fine except for when you try and click on the title for the last element in the array, it does not display.
document.writeln('<font color=orange><div id="ieslider1" onclick="showMsg((i-1)) style="position:relative;width:'+swidth+'; cursor: hand;">')
the above code shows the onclick event which selects the message to be shown. It is (i-1) as the 1st title is the zero element in the array. For example, the 1st title to be clicked on will want the 0th message displayed. The showMsg function is:
// Pump in the message text
var headerDiv = messages[whichMsg]
var displayDiv = messages[whichMsg]
msgDiv.innerHTML = '<h3>'+ headerDiv +'</h3>'+ displayDiv
I have tried everything I know to get this to work and everytime it fails for the final element.