Results 1 to 3 of 3

Thread: [RESOLVED] Question about Script

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2001
    Posts
    759

    Resolved [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);
    	    }
    
    
    }

  2. #2
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: Question about Script

    Check the browser's JavaScript error console, or the browser developer tools for script errors. That should highlight your problem.
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2001
    Posts
    759

    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
  •  



Click Here to Expand Forum to Full Width