[dokuwiki] Re: addEvent javascript question
- From: "Martin Tschofen" <martin.tschofen@xxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Tue, 23 May 2006 07:39:31 -0500
The problem is that the function doesn't even get called after using addEvent.
I removed all plugins, switched to default tpl and tried a variation of:
addEvent(thisPopup, 'change', function(){linkToPage(thisPopup)});
addEvent(thisPopup, 'change', function(){linkToPage(this)});
addEvent(thisPopup, 'change', function(){linkToPage()});
addEvent(thisPopup, 'change', linkToPage);
I'll break it out of DW and see if I can find out more...martin
On 5/23/06, Andreas Gohr <andi@xxxxxxxxxxxxxx> wrote:
Martin Tschofen writes:
> addEvent(thisPopup, 'change',
function(){linkToPage(thisPopup)});
try passing this in the callback function. eg:
addEvent(thisPopup, 'change', function(){linkToPage(this)});
Variable scope in closures is a mystery sometimes.
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: addEvent javascript question
- From: Martin Tschofen
- References:
- [dokuwiki] addEvent javascript question
- From: Martin Tschofen
- [dokuwiki] Re: addEvent javascript question
- From: Andreas Gohr
Other related posts:
- » [dokuwiki] addEvent javascript question
- » [dokuwiki] Re: addEvent javascript question
- » [dokuwiki] Re: addEvent javascript question
- » [dokuwiki] Re: addEvent javascript question
- » [dokuwiki] Re: addEvent javascript question
Martin Tschofen writes:
> addEvent(thisPopup, 'change', function(){linkToPage(thisPopup)});
try passing this in the callback function. eg:
addEvent(thisPopup, 'change', function(){linkToPage(this)});Variable scope in closures is a mystery sometimes. -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist
- [dokuwiki] Re: addEvent javascript question
- From: Martin Tschofen
- [dokuwiki] addEvent javascript question
- From: Martin Tschofen
- [dokuwiki] Re: addEvent javascript question
- From: Andreas Gohr