If you declare a function (your plusOneCalled) inside another function
(Tapestry.onDOMLoaded), it won't be visible outside the function.

Don't use addScript, unless you can initialize the button itself in
addScript as well. Or you can use addScript and add the function to the
window variable ( window.plusOneCalled = function () { alert('...'); } ),
which should make it visible.

You could also put plusOneCalled function in its own js file.

--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/javaScriptSupport-addScript-vs-script-in-tml-file-tp6762486p6763598.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to