two ways:
create a javascript function, not a js-object, thats called by "onclick"
or create a javascript-object, with eventhandler that handles the onclick
event like this
Event.observe(this.fieldSetLegend, "click",
this.toggle.bindAsEventListener(this));
Imants Firsts wrote:
>
> Hi!
>
Hi!
What is the correct way to use JavaScript in my
tapestry components?
If I use the code below, and my HTML has a button with
onclick="myObj.doSomething();", it can not find myObj.
pageRenderSupport.addScriptLink(myLibrary);
pageRenderSupport.addScript("var myObj = new MyObj();"