473,385 Members | 1,569 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,385 software developers and data experts.

about attachEvent()

Dormilich
8,658 Expert Mod 8TB
Hi,

does attachEvent() allow multiple functions to be registered for an event (like addEventListener() does?), MSDN is not very precise about that.

thanks, Dormi
Jan 19 '10 #1

✓ answered by gits

have had a look here and it seems to work ... but note:

... If you attach multiple functions to the same event on the same object, the functions are called in random order, immediately after the object's event handler is called. ...
kind regards,
gits

2 1370
gits
5,390 Expert Mod 4TB
have had a look here and it seems to work ... but note:

... If you attach multiple functions to the same event on the same object, the functions are called in random order, immediately after the object's event handler is called. ...
kind regards,
gits
Jan 20 '10 #2
acoder
16,027 Expert Mod 8TB
Had a look at the MSDN link, and the examples are ugly!
Jan 31 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Adrian Parker | last post by:
Using asp.net 2003 When I use document.attachEvent("onmousemove", resetTimer); The first time into a page, it works fine, but the 2nd time the page is loaded (not postback) it gives a...
2
by: hifchan | last post by:
I'd like to attach an event to a group of possible controls, each event's handling function might exepect different parameters. By learning IE's attachEvent, I found no way to pass parameters. ...
5
by: Bert | last post by:
Hello, I'm having some problems with creating a script that works on both Mozilla browsers as IE. I want to change the background color of textareas and input text fields as soon as somebody...
18
by: luco | last post by:
Hi! I'm having a problem with attachEvent function. I'd like to add attachEvent dynamically to some objects so that each could execute event function with different parameter value. The question...
5
by: J | last post by:
I am having problems dynamically adding more than one event handler to an input. I have tried the Javascript included at the bottom. The lines inp.attachEvent('onkeyup',...
3
by: SkyZhao | last post by:
i use attachEvent to bind a event ; code: img.attachEvent("onclick",alert("aa")); div.appendChild(img); div.innerHTML+="some text"; the event can not work; why can't i use it? if i use...
6
by: SkyZhao | last post by:
if i use AttachEvent like this,it can't work; eg: var img = document.createElement("img"); img.attachEvent("onclick",alert("test")); var div = document.createElement("div");...
12
by: Max | last post by:
Hi All, I need to check if attachEvent was done to an element. The problem is that attachEvent does not save this information anywhere. Is there any way to do this??? Thanks, Max
17
by: dmorand | last post by:
I'm trying to get attachEvent to work for IE, but am having a problem. It calls hello() the first time, but then the script errors out. Should hello() be returning something to the attachEvent...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.