[RESOLVED] Question about Script
Hi Everyone,
I currently have the following script that works just fine in an Internet Explorer 9 browser running in compatibility mode however, if I try to run the following script out of compatibility mode nothing happens. The div layer is supposed to move down the page to be in line with the text box that the user selected. Any help would be appreciated.
Code:
function ShowHelpDiv(el, e2) {
var helpArray = [];
helpArray[0] = "First Name help is displayed here.";
helpArray[1] = "Last Name help is displayed here.";
if (helpArray[e2] == undefined) {
document.getElementById('helparea').style.height = 0;
document.getElementById('helparea').style.display = 'none';
}
else {
document.getElementById('helparea').style.display = '';
document.getElementById('helpctr').innerHTML = '<b>HELP TIP</b><br /><br />' + helpArray[e2];
document.getElementById('helppop').style.top = (el - document.getElementById('Table2').offsetTop - 6);
}
}
Re: Question about Script
Check the browser's JavaScript error console, or the browser developer tools for script errors. That should highlight your problem.
Re: Question about Script
Thanks for the reply. I needed to add a + 'px' to the end of the .style.top line. It seems to work fine now.