|
-
Feb 11th, 2013, 05:41 PM
#1
Thread Starter
Fanatic Member
[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);
}
}
-
Feb 11th, 2013, 09:09 PM
#2
Re: Question about Script
Check the browser's JavaScript error console, or the browser developer tools for script errors. That should highlight your problem.
-
Feb 11th, 2013, 11:56 PM
#3
Thread Starter
Fanatic Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|