Scripted event handlers in objects 
Author Message
 Scripted event handlers in objects

This worked OK-
...

document.all[this.switchScreenName[level]].insertAdjacentHTML("beforeEnd",
html);
   document.all[this.switchScreenName[level]].all['fred0'].onclick =
this.tester;

but this didn't-
...

document.all[this.switchScreenName[level]].insertAdjacentHTML("beforeEnd",
html);

   document.all[this.switchScreenName[level]].all['fred0'].onclick =
                                function() { this.tester(32); };

Is this to do with being inside an object- I'm new to scripted handling..

Cheers
Justin Dutoit



Sun, 27 Jun 2004 19:11:25 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Scripted event handlers in objects cont'd

2. Add an event handler to the actual event handler for an element

3. Determining which object fired event from event handler.

4. Referencing document object of IFrame object in event handler

5. Problem with reassigning an object's event handlers

6. this object in event handler

7. JScript Event handler for activex object

8. Scripting event handlers for OCX controls

9. JScript event handler for ActiveX DLL events within IE

10. onchange event/event handler not triggering

11. event handler for server sided sub or function

12. How is an event handler setup in HTML

 

 
Powered by phpBB® Forum Software