Thread:Project:Support desk/Passing Javascript variables to a custom MediaWiki 1.16 Extension

How to do that for Mediawiki 1.16?

The following can't make a button that calls another of my javascript function.

$wgOut->addScript("\n".      "function myAddButton{\n".       "  addButton('$myButtonPicture','tooltip','#REDIRECT ','','Insert text');".       "  }\n".       "addOnloadHook(myAddButton);\n".       " ");