Internet Explorer 5.0, Part II: Behavior Handler's attachEvent ...
Our web spider found the following code snippet at www_webreference_com and contains information about attachEvent and JavaScript.
attachEvent("onload", onload);
attachEvent("onclick", onclick);
function onclick() {
var a = src;
if (src.indexOf("ibutton.bmp") < 0) return;  
clickEvent = createEventObject();
clickEvent.id = uniqueID;
if (window.lastPlayedBy == "o") {
src = "xbutton.bmp";
window.lastPlayedBy = "x";
clickEvent.playedBy = "x";
else {  // lastPlayedBy = "x"
src = "obutton.bmp";
window.lastPlayedBy = "o";
clickEvent.playedBy = "o";
fireEvent("onBoxClick", clickEvent);
function onload() {
loadEvent = createEventObject();
loadEvent.id = uniqueID;
fireEvent("onBoxLoad",loadEvent);
</SCRIPT>
</SCRIPTLET> 

Notice the two different objects prefixing the attachEvent() calls. The first ca
ll ap
Read the entire article....