[Seaside] How do I use JQuery with Javascript variable
Francisco Martins
chicoary at gmail.com
Sat Jan 28 22:55:59 UTC 2012
I'm trying to code some examples in the book I found JQuery JQuery in
Action, Second Edition.
The example has the following code snippet:
<script type="text/javascript">
$(function(){
$('#testButton').click(function(){
var checkedValue = $('[name="someRadioGroup"]:radio:checked').val();
$('#result').html('The radio element with value <tt>' +
checkedValue + '</tt> is checked.');
});
});
</script>
I do not know what to write on the line with a comment below:
html document addLoadScript: (
(html jQuery: #testButton) onClick: (
(html jQuery: #result) load html: [:renderer| |checkedValue|
checkedValue := 'What is equivalent to the code in the comment?'.
"var checkedValue =
$('[name=''someRadioGroup'']:radio:checked').val();"
renderer html: 'The radio element with value <tt>' , checkedValue
, '</tt> is checked.'
]
)
).
Thanks for any help.
chicoary
More information about the seaside
mailing list