<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
You might consider writing a method to handle that. It'll end up being a lot more organized as well.<div><br></div><div>Maybe something along these lines:</div><div><br></div><div>" ... "</div><div>onChange: (html jQuery ajax script: [:s | s add: ( self select: #whicheverButtonIsBeingClicked on: s ) ]);</div><div>" ... "</div><div><br></div><div>#select: aSymbolOrIdentifierOfSomeSort on: html</div><div><br></div><div>&nbsp;&nbsp; &nbsp;"if lab, increase lab, decrease lecture or whatever"</div><div>&nbsp;&nbsp; &nbsp;"return some javascript to reflect changes"</div><div><br></div><div>&nbsp;&nbsp; &nbsp;"if ... "</div><div>&nbsp;&nbsp; &nbsp;" etc ... "</div><div><br></div><div>RS<br><hr id="stopSpelling">Date: Sat, 20 Nov 2010 15:58:26 +0100<br>From: gschtick@gmail.com<br>To: seaside@lists.squeakfoundation.org<br>Subject: [Seaside] headache with radiobuttons<br><br>Hello again,<br><br>I am having some trouble working with radiobuttons:<br><br>I have a component with 3 counters: #lectureCount, #labCount and #tutorialCount.<br>Then I have 4 radiobuttons: #free, #lecture, #lab and #tutorial.<br>
<br>Then I have an onChange: ((html jQuery #XXXcount) load html: [:h | h render: (XXXcount := XXXcount +1)]) for each of the lecture, lab and tutorial button.<br><br>What I am trying to do is decrease the counter that is associated with the previously selected radioButton.<br>
<br>For example if I had the #lecture radioButton selected, when I pick the #lab button instead it increases the #labCount but I would like also to decrease the #lectureCount.<br>So in effect I need to: a) find out which button was selected. b) have multiple actions with onChange : (increase one counter and decrease another).<br>
<br>Also, I was under the impression that using (html jQuery this attributeAt: 'selected') on a radioButton would give me a boolean value, but it seems it's not the case and I don't understand why.<br><br>
Thanks,<br>Gilles<br><br>
<br>_______________________________________________
seaside mailing list
seaside@lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</div>                                               </body>
</html>