HighDots Forums  

Connecting a callback action listener WITH parameters

Javascript JavaScript language (comp.lang.javascript)


Discuss Connecting a callback action listener WITH parameters in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
K Viltersten
 
Posts: n/a

Default Re: Connecting a callback action listener WITH parameters - 05-23-2008 , 04:40 AM






Quote:
Do you mean that switching between quotation
marks and apostrophes makes that difference?
No, it does not matter whether you use single or double quotes. The
difference is the function makeSameStuff, which returns function that
is used as second argument of butt1.on and butt2.on.
Oh, NOW i see it. It took quite some time (and your
explaination) before it rang the bell. Thanks!

--
Regards
Konrad Viltersten


Reply With Quote
  #12  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: Connecting a callback action listener WITH parameters - 05-23-2008 , 06:28 AM






Álvaro G. Vicario wrote:
Quote:
Thomas 'PointedEars' Lahn escribió:
The Reference has zero relevance to this question.
To pass parameters to an event handler, the handler must be
wrapped into another function"

document.form1.button1.onclick = function() {
setBGColor('some value');
};

http://developer.mozilla.org/en/docs...event_handlers
This section should be removed as it advocates an obsolete practice
and has nothing to do with the ("Core") programming language. Event
handlers/listeners are part of the (Gecko) DOM API.

So the syntax to assign a callback function with parameters is... :-?
I am talking about obsolete *practice*, _not_ syntax.

Maybe someone who does not mind your network abuse[1] takes the time
explaining the difference to you.


PointedEars
___________
[1] http://tools.ietf.org/html/rfc1036
http://tools.ietf.org/html/rfc2822#section-3.4
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann


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.