Thread:Project:Support desk/SpecialPage extension: execute JavaScript function onclick/reply

The JavaScript needs to go to its own file. Then you need to attach the hook handler via JavaScript (jQuery, to be exact), like this:

Do NOT use any onSomething handlers in the HTML; you'll only enter a world of pain that way.

See ResourceLoader for some more documentation, take a look at a pre-existing extension for a "live example" (from "my" extensions, I'd recommend Extension:Comments &mdash; it's relatively sane and easier to understand than Extension:SocialProfile ;-) and if you still can't find the answer to your question(s), ask on the #mediawiki IRC channel on irc.freenode.net; there are a lot of people online there throughout the day and I'm sure someone there can either help you out or at least direct you to the correct direction.