Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 11th, 2008, 11:08 PM
Authorized User
 
Join Date: Aug 2006
Location: , , .
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?

thanks


Reply With Quote
  #2 (permalink)  
Old February 12th, 2008, 04:14 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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

--

Joe (Microsoft MVP - XML)
Reply With Quote
  #3 (permalink)  
Old February 12th, 2008, 04:35 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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

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

Joe (Microsoft MVP - XML)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 02:42 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.