fixing the code >>

but just modify and place this in your [[MediaWiki:Common.js]] file


addOnloadHook(function(){
var btn = document.createElement('input');
btn.setAttribute('type','submit');
btn.setAttribute('value','Click Me!');
 addClickHandler(btn,function(){
// do something
});
 document.getElementById('bodyContent').appendChild(btn);
});


addOnloadHook and addClickHandler are functions found in the wikibits.js
file


Walter Mazza


On Wed, Feb 10, 2010 at 1:38 PM, Walter Mazza <[email protected]> wrote:

> Should be as simple using JavaScript...
>
> addOnloadHook(function{
>     var btn = document.createElement('input');
>     btn.setAttribute('type','submit');
>
>     addClickHandler(btn,function(e){
>          // do something
>     });
>
>     document.getElementByID('bodyContent').appendChild(btn);
> });
>
> On 2/10/10, Herulee <[email protected]> wrote:
> >
> > Hello,
> >
> > Is it possible to add a button on the wiki page?
> > and adding a event handler on that
> >
> > Thanx in advance
> >
> >
> > --
> > View this message in context:
> > http://old.nabble.com/Adding-Button-tp27533321p27533321.html
> > Sent from the WikiMedia General mailing list archive at Nabble.com.
> >
> >
> > _______________________________________________
> > MediaWiki-l mailing list
> > [email protected]
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >
>
> --
> Sent from my mobile device
>
> Walter Mazza
>
_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to