473,503 Members | 2,238 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

setInterval Event object?

Is there a way to access an Event object associated with setInterval()?
I'm using Mozilla and Firefox on various platforms.
Jul 23 '05 #1
3 1681

Event objects are associated with....events. setInterval is a function.

Mozilla browsers manage the Event object as a handable object, passed
automatically to any assigned handler function (as arguments[0]).

Might need to explain your specific problem.

http://www.mozilla.org/docs/dom/domr...event_ref.html
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #2
Richie wrote:
Is there a way to access an Event object associated with setInterval()?
I'm using Mozilla and Firefox on various platforms.


You may pass a function instead of a string to setInterval or
setTimeout. You may then use the closure to access variables defined in
the original function.
However, this one caused problems on IE 5.0 in some testcases.

function clickHandler(e) {
e = e || window.event;
setTimeout(function() { alert(e.type); },1000);
}

Daniel
Jul 23 '05 #3
VK
Is there a way to access an Event object associated with setInterval()?


You mean something like "Timer Interruption" IRQ?
No, such event is not defined neither in JavaScript, nor JScript.

Access to timers is a part of security model. The underlying logic is: "If
it's
your timer, you can code it in the way you want. If you cannot reach the
timer, so it's not your timer, so it's not up to you to handle it."


Jul 23 '05 #4

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

Similar topics

28
20272
by: Daniel | last post by:
Hello =) I have an object which contains a method that should execute every x ms. I can use setInterval inside the object construct like this - self.setInterval('ObjectName.methodName()',...
10
7738
by: Richard A. DeVenezia | last post by:
At line this.timerId = setInterval (function(){this.step()}, 100) I get error dialog Error:Object doesn't support this property or method. If I change it to this.timerId = setInterval...
6
15189
by: marktm | last post by:
Hi- I am trying to use setInterval to call a method within an object and have not had any luck. I get "Object doesn't support this property or method" when I execute the following code. What I...
4
3235
by: barry | last post by:
If The script below is exeuted from the onload="startit()" in the body tag everything works fine but when I remove the onload and try to execute by using the attributes.add from within the Page_Load...
3
5769
by: shawn | last post by:
Hi All Was trying to get this bit of code working (simplified of course) for (i=0;i<uuid_num;i++) { window.setInterval(InitMap(uuidValues), timePeriod); } Where uuid_num, uuidValues,...
1
1409
by: Jeff | last post by:
I've been trying to pass in an object in a setInterval but it complains about missing ] after elenment list. setInterval("someFunction("+some_object+")",1000); What's the correct syntax to do...
4
2670
by: RgeeK | last post by:
From my newbie perspective I understand that Javascript is a single threaded environment and so interrupt-driven events are going to be somewhat challenging. But, I have an issue which seems to...
1
2472
by: jonahmason | last post by:
hi. a javascript newbie here in dire need of help. for the past 3 days i've been trying to get a script using setinterval to work but a part of the code, that executes after setinterval hits a...
2
2758
by: shawnwperkins | last post by:
Hi Folks, I'm new to Javascript and just need a little help. I downloaded a script from Dynamic Drive's Web site and I'm trying to make a simple modification and could use some help. :) The...
0
7093
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
7291
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
7357
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...
1
7012
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
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5598
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,...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3171
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
402
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.