HighDots Forums  

Re: How to acheive this ..

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: How to acheive this .. in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Richard Cornford
 
Posts: n/a

Default Re: How to acheive this .. - 05-05-2006 , 04:01 AM






Richard Cornford wrote:
<snip>
Quote:
x[1].onclick = callMe;
...

- so that it will be executed as a method of the Element, or
use a closure[1] to associate the element with a - function:-

function getOnclickReportFnc(element){
return (function(){
alert(element.nodeName);
]);
^
That should be a closing brace (- } -) not a closing square bracket.

Richard.

Quote:
}
snip

Richard.




Reply With Quote
  #2  
Old   
Sriram
 
Posts: n/a

Default Re: How to acheive this .. - 05-05-2006 , 07:43 AM






Thank you, the method you have suggested works.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.