Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 11th, 2008, 11:08 PM
Authorized User
Join Date: Aug 2006
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default need help on this JS error code in IE

window.onscroll = self.setTimeout("self.placeIt('layer1')",500);

window.onscroll has an error in internet explorer 6
"Not implemented"

it works fine in firefox

How can I resolve this?


Old February 12th, 2008, 04:14 AM
joefawcett's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

Can you provide a small sample page to demonstrate, I have used this event many times?


Joe (Microsoft MVP - XML)
Old February 12th, 2008, 04:35 AM
joefawcett's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

After a little experimenting I think the problem is your use of setTimeout. If you move that into a separate function then it works:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<title>OnScroll Test</title>
<style type="text/css">
<script type="text/javascript">

function showScroll(x, y)
  var oOutput = document.getElementById("divOutput");
  oOutput.innerHTML += "screenX: " + x + ", screenY: " + y + "<br />";

function delayShowScroll()
  setTimeout("showScroll(" + event.screenX + ", " + event.screenY + ")", 1000);

window.onscroll = delayShowScroll;

<div id="divOutput" style="border: 2px solid #c0c0c0; height: 600px; width: 200px; position: relative"></div>

Joe (Microsoft MVP - XML)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert ASP code in JS *need HELP* deean Classic ASP Basics 16 June 28th, 2008 08:57 AM
zxml.js version 1.0 minor code defects darrenshu BOOK: Professional Ajax ISBN: 978-0-471-77778-6 7 October 31st, 2007 09:25 AM
error in JS code austinf Javascript 2 May 10th, 2006 03:42 AM
Wrong zXml.js file somewhere in the code package? laurens-b BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 March 20th, 2006 11:26 AM
How to stop user from view js code but still work bekim Javascript How-To 4 January 7th, 2005 09:08 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.