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();"
                
The problem is that my object is created in
Tapestry.onDOMLoaded() function and I can not access it
later.

How to solve this? Is the only way is to pass the ID of
the button to the constructor of my object and add the
event handler to the button using Prototype? Is that
the best way?

Merry Christmas,
Imants Firsts


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to