<br><br><div class="gmail_quote">On Fri, Oct 22, 2010 at 6:57 PM, Robert Sirois <span dir="ltr"><<a href="mailto:watchlala@hotmail.com">watchlala@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>If the button isn't in a form block, it won't execute the callback (thereby refreshing the page).<br></div></blockquote><div><br></div><div>I just tested that and it will perform the javascript without being in a form. </div>
<div>The problem with the original code is that the "with:" message must come last, as it causes the tag to be serialized out to the context.</div><div><br></div><div>John </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><br>You can also call #bePush on it so it doesn't execute.<br><br>ie.<br><br>html button<br> bePush;<br> onClick: (html jQuery this html: WACounter new);<br> value: 'i turn into a counter dealybob!'.<br>
<br>Hope that helps,<br>RS via G1<br><br><hr>Date: Fri, 22 Oct 2010 17:59:49 -0400<br>From: <a href="mailto:arning@charm.net" target="_blank">arning@charm.net</a><br>To: <a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
Subject: Re: [Seaside] Use of onClick to call JavaScript<div><div></div><div class="h5"><br><br>
<font face="Georgia">Hmmm.... try it with something other than a
button. I think the clicking behavior is being pre-empted by the
button itself.<br>
<br>
Cheers,<br>
Bob<br>
</font><br>
On 10/22/10 5:52 PM, Thomas McCune wrote:
<blockquote>
<div><font face="Arial" size="2">In HTML it is possible to create
a button in a form and cause Javascript to execute</font></div>
<div><font face="Arial" size="2">using onClick. For example, the
following form causes the JavaScript alert function</font></div>
<div><font face="Arial" size="2">to be executed when the button is
clicked.</font></div>
<div> </div>
<div><font face="Arial" size="2"><form name="myForm"><br>
Name: <input type="text"<br>
onkeyup="ajaxFunction('Hello');" name="username" /><br>
Time: <input type="text" name="time" /><br><br>
<input type=BUTTON onClick="alert('GoodBye');"
value="GoodBye" /><br>
</form></font></div>
<div> </div>
<div><font face="Arial" size="2">In Seaside, I have tried to
achieve the same without success with the</font></div>
<div><font face="Arial" size="2">following button definition:</font></div>
<div> </div>
<div><font face="Arial" size="2">renderDoItButtonOn: html</font></div>
<div> </div>
<div><font face="Arial" size="2"> html button with: 'Doit';<br>
onClick: 'alert("GoodBye");'.</font></div>
<div> </div>
<div><font face="Arial" size="2">The page refreshes but the
JavaScript does not appear to execute. Is there a way</font></div>
<div><font face="Arial" size="2">to accomplish this? I have tested
onKeyUp: and it does execute the string as</font></div>
<div><font face="Arial" size="2">JavaScript just as I expected.</font></div>
<div> </div>
<div><font face="Arial" size="2">Thank you</font></div>
<pre><fieldset></fieldset>
_______________________________________________
seaside mailing list
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>
</pre>
</blockquote>
<br></div></div>_______________________________________________
seaside mailing list
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>                                            </div>
<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><a href="http://john-mckeon.us" target="_blank">http://john-mckeon.us</a><br>