Re: T5: JavaScript in my components

2007-12-23 Thread Sven Homburg
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! >

T5: JavaScript in my components

2007-12-23 Thread Imants Firsts
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();"