Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Netscape 6 event model


Message #1 by "Nyman, Robert" <Robert.Nyman@i...> on Wed, 12 Dec 2001 12:04:53 +0100
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C182FC.D38FF140
Content-Type: text/plain

Hi,
 
I have a question about the event model in Netscape 6.
 
Of course there a several ways to attach an event to an element.
For example:
 
oDiv.addEventListener("click", onClickFunc, false);
 
function onClickFunc(e){
    alert(e); // Returns the event and its properties
}
 
oDiv.onclick = function (e){
    alert(e); // Returns the event and its properties
}
 
 
But what if I want to attach the event in HTML only? How do I pass or get
access to the event?
 
For example:
 
<div onClick="onClickFunc()">A div</div>
 
How would I pass the event to the onClick func?
Or how do I get access to it in onClickFunc?
 
 
 
/Robert 
 
 

 
 
..............................................................
robert nyman, technical research manager	
fryxellsgatan 4, s-114 25 stockholm	

ph	 +46 (0)8 506 31 500	
d	 +46 (0)8 506 31 510	
m	 +46 (0)733 50 22 09	
f	 +46 (0)8 506 31 599	
e	 robert.nyman@i... <mailto:robert.nyman@i...> 	
www	 http://www.ibizkit.se <http://www.ibizkit.se/> 	
..............................................................	
 

 


  Return to Index