We help IT Professionals succeed at work.
Get Started

IE7 shows the page streched with a error when a pop up is shown.  Javascript error Error: Not Implemented

nirisan
nirisan asked
on
332 Views
Last Modified: 2012-05-06
I have to pop up a <div> with some text when a user clicks on a hyperlink. I am using the following javascript code. It works fine in Firefox but streches the page in IE7 with a  javascript error.

Error: Not Implemented (in the last line)

I have marked the line in the code

---------------------CSS----------------
 
	#layerFeedback{
	position: absolute;
	visibility: hidden;
	width: 310px;
	height: 600px;
	left: 60%;
	top: 85 px;
	background-color:  #CCE5FD;;
	border: 1px solid #000;
	padding: 1px:4px:1px:5px;
	padding-left:5px;
	overflow: auto;
}
 
#close {
	float: right;
	
}
 
 
-----------HTML- where the div is---------------
 
<div id="layerFeedback">
   <div id ="close" ><a href="javascript:setVisible('layerFeedback')" style="text-decoration:none; ">Hide &nbsp; <sup><strong>x</strong></sup></a></div><br/>
  <p>some text </p>
     
     <p>more text.</p>
 
 <p>more text </p>
 
 <p>more text again</p>
 
</div>
 
 
 
------------------javascript------------------------------
 
x = 60;
y = 85;
function setVisible(obj)
{
	obj = document.getElementById(obj);
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
}
function placeIt(obj)
{
	obj = document.getElementById(obj);
	if (document.documentElement)
	{
		theLeft = document.documentElement.scrollLeft;
		theTop = document.documentElement.scrollTop;
	}
	else if (document.body)
	{
		theLeft = document.body.scrollLeft;
		theTop = document.body.scrollTop;
	}
	theLeft += x;
	theTop += y;
	obj.style.left = theLeft + '%' ;
	obj.style.top = theTop + 'px' ;
	setTimeout("placeIt('layerFeedback')",500);
}
window.onscroll = setTimeout("placeIt('layerFeedback')",500);          <----------------------------------Errors on this line

Open in new window

Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE