<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>Ya #with: always goes last.<br><br>So.. did you figure it out?<br><br>RS via G1<br><br><hr>Date&#58; Fri, 22 Oct 2010 19&#58;01&#58;22 -0400<br>Subject&#58; Re&#58; [Seaside] Use of onClick to call JavaScript<br>From&#58; p3anoman@gmail.com<br>To&#58; seaside@lists.squeakfoundation.org<br><br><br><br><div class="ecxgmail_quote">On Fri, Oct 22, 2010 at 6&#58;57 PM, Robert Sirois <span dir=ltr>&lt;<a href="mailto&#58;watchlala@hotmail.com">watchlala@hotmail.com</a>&gt;</span> wrote&#58;<br><blockquote class="ecxgmail_quote" style="border-left&#58;1px #ccc solid;padding-left&#58;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.&nbsp;</div>
<div>The problem with the original code is that the &quot;with&#58;&quot; message must come last, as it causes the tag to be serialized out to the context.</div><div><br></div><div>John&nbsp;</div><blockquote class="ecxgmail_quote" style="border-left&#58;1px #ccc solid;padding-left&#58;1ex">
<div><br>You can also call #bePush on it so it doesn't execute.<br><br>ie.<br><br>html button<br>&nbsp;&nbsp;&nbsp;&nbsp;bePush;<br>&nbsp;&nbsp;&nbsp;&nbsp;onClick&#58; (html jQuery this html&#58; WACounter new);<br>&nbsp;&nbsp;&nbsp;&nbsp;value&#58; 'i turn into a counter dealybob!'.<br>
<br>Hope that helps,<br>RS via G1<br><br><hr>Date&#58; Fri, 22 Oct 2010 17&#58;59&#58;49 -0400<br>From&#58; <a href="mailto&#58;arning@charm.net">arning@charm.net</a><br>To&#58; <a href="mailto&#58;seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
Subject&#58; Re&#58; [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&#58;52 PM, Thomas McCune wrote&#58;
    <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>&nbsp;</div>
      <div><font face=Arial size=2>&lt;form name=&quot;myForm&quot;&gt;<br>
          Name&#58; &lt;input type=&quot;text&quot;<br>
          onkeyup=&quot;ajaxFunction('Hello');&quot; name=&quot;username&quot; /&gt;<br>
          Time&#58; &lt;input type=&quot;text&quot; name=&quot;time&quot; /&gt;&lt;br&gt;<br>
          &lt;input type=BUTTON onClick=&quot;alert('GoodBye');&quot;
          value=&quot;GoodBye&quot; /&gt;<br>
          &lt;/form&gt;</font></div>
      <div>&nbsp;</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&#58;</font></div>
      <div>&nbsp;</div>
      <div><font face=Arial size=2>renderDoItButtonOn&#58; html</font></div>
      <div>&nbsp;</div>
      <div><font face=Arial size=2>&nbsp;html button with&#58; 'Doit';<br>
          &nbsp;&nbsp;onClick&#58; 'alert(&quot;GoodBye&quot;);'.</font></div>
      <div>&nbsp;</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&#58; and it does execute the string as</font></div>
      <div><font face=Arial size=2>JavaScript just as I expected.</font></div>
      <div>&nbsp;</div>
      <div><font face=Arial size=2>Thank you</font></div>
      <pre><fieldset></fieldset>
_______________________________________________
seaside mailing list
<a href="mailto&#58;seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a>
<a href="http&#58;//lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http&#58;//lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>
</pre>
    </blockquote>
  

<br></div></div>_______________________________________________
seaside mailing list
<a href="mailto&#58;seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a>
<a href="http&#58;//lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http&#58;//lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>                                               </div>
<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto&#58;seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http&#58;//lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http&#58;//lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br><br clear=all><br>-- <br><a href="http&#58;//john-mckeon.us" target="_blank">http&#58;//john-mckeon.us</a><br>
<br>_______________________________________________
seaside mailing list
seaside@lists.squeakfoundation.org
http&#58;//lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside                                               </body>
</html>