[Seaside] Use of onClick to call JavaScript
Thomas McCune
thomas.mccune at att.net
Fri Oct 22 21:52:48 UTC 2010
In HTML it is possible to create a button in a form and cause Javascript to execute
using onClick. For example, the following form causes the JavaScript alert function
to be executed when the button is clicked.
<form name="myForm">
Name: <input type="text"
onkeyup="ajaxFunction('Hello');" name="username" />
Time: <input type="text" name="time" /><br>
<input type=BUTTON onClick="alert('GoodBye');" value="GoodBye" />
</form>
In Seaside, I have tried to achieve the same without success with the
following button definition:
renderDoItButtonOn: html
html button with: 'Doit';
onClick: 'alert("GoodBye");'.
The page refreshes but the JavaScript does not appear to execute. Is there a way
to accomplish this? I have tested onKeyUp: and it does execute the string as
JavaScript just as I expected.
Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20101022/577e0933/attachment.htm
More information about the seaside
mailing list