473,406 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

IE Invalid Argument... sometimes

The following code is stored inside a div element.

Movable.prototype.moveTimer = function() {
this.style.left = (this.offsetLeft - (this.posX - this.newX)) + "px";
this.style.top = (this.offsetTop - (this.posY - this.newY)) + "px";
this.posX = this.newX;
this.posY = this.newY;
}

every 40 ms it is called by a timer.

var self = this;
this.timer = setInterval(function(){self.moveTimer()},40);

It works all the time in Firefox. Sometimes in IE it says it gets an
invalid argument here:

-->|this.style.left = (this.offsetLeft - (this.posX - this.newX)) +
"px";

The code moves the div element with a mouse click and drag. After I
get the error I can try to drag it again and it will drag. Sometimes
it will not get the error. So it's like... random?

Any help would be great. Thanks
Jun 27 '08 #1
1 1841
an********@gmail.com wrote:
The following code is stored inside a div element.

Movable.prototype.moveTimer = function() {
this.style.left = (this.offsetLeft - (this.posX - this.newX)) + "px";
this.style.top = (this.offsetTop - (this.posY - this.newY)) + "px";
this.posX = this.newX;
this.posY = this.newY;
}

every 40 ms it is called by a timer.

var self = this;
this.timer = setInterval(function(){self.moveTimer()},40);

It works all the time in Firefox. Sometimes in IE it says it gets an
invalid argument here:

-->|this.style.left = (this.offsetLeft - (this.posX - this.newX)) +
"px";

The code moves the div element with a mouse click and drag. After I
get the error I can try to drag it again and it will drag. Sometimes
it will not get the error. So it's like... random?
Welcome to MSHTML. That said, you should not augment host objects; if you
have the need to do that, use a wrapper object instead.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Owen Jenkins | last post by:
Hello. For years I've been using the DBEngine.CompactDatabase code to make backups of backend databases. But now I've struck a baffling problem where I get an Invalid Argument error. This...
5
by: Mariame | last post by:
Hi All, I have a datagrid in the select button i write the following code: Response.Write("<script>window.open('new.aspx', New Page',...
1
by: llevi | last post by:
Hi there, My aspnet_state.exe service is failing to start due to an invalid argument. Does anyone know what arguments are required/valid for this service. I am running XP pro, .NET Framework v...
0
by: Greg | last post by:
Hi, creating template1 database in /var/pgsql/data1/base/1... DEBUG: invoking IpcMemoryCreate(size=1081344) FATAL: shmat(id=1179648) failed: Invalid argument What's the problem why is shmat...
5
by: Nuno Magalhaes | last post by:
I'm trying to set a multicast server but I get "Invalid argument" when setting multicast options. Below is the code that gives me problems more precisely in SetSocketOption with the AddMembership...
2
by: veaux | last post by:
Peeked around here but didn't really see an explanation as to the varied "Invalid Argument" errors that appear in Access sometimes. I'm using Access 2003 and trying to import an Access table of...
0
by: ian | last post by:
One of my customers occasionally gets a corrupted record - where all the fields show #error and forms bound to the damaged table do not open (the VBA code doesn't execute) and the error message is...
4
by: robert | last post by:
On a server the binary (red hat) installed python2.4 and also a fresh compiled python2.5 spits "sem_post: Invalid argument". What is this and how can this solved? Robert ============== ...
23
by: nikki2 | last post by:
Hi I have a database, with which I have always had problems. Sometimes they were Invalid Argument problems, and sometimes there were others (such as that the record was too large). Some of the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.