[albatross-users] check boxes again.
Eric S. Johansson
esj at harvee.org
Fri Jul 4 02:30:42 EST 2003
http://harvee.org/greeneggs/retrain.cgi
it is working better.
however, I still have a major problem with checkbox state presetting. I can
either set them all on or set them all off. then there's the question of
getting the data back on the state of all the checkboxes.
This is a fragment of the entire form cut down for intelligibility
<al-form action="retrain.cgi" method="post">
...
<al-for iter="line" expr="display_list">
<tr class=<al-value expr="line.value().style">>
<td bgcolor="#ffffff" align=center >
<al-exec expr="albatross_token = line.value().token">
<al-input type="checkbox" name="albatross_token" valueexpr="line.value().token"
list onclick="CCA(this,'mystery');DownReset();" >
<td><al-value expr="line.value().truncated_score()">
<al-if expr="line.value().list_type != None">
<br>
<al-value expr="line.value().list_type">
</al-if>
</td>
<td><al-value expr="line.value().destination"></td>
<td><al-value expr="line.value().from_address"></td>
<td><a href=<al-value expr="'spamtrap_display.cgi?token='+line.value().token">
target="spamtrap_display"> <al-value expr="line.value().subject"></a></td>
</tr>
</al-for>
</table>
<br>
...
</al-form>
as you can see, I feed it with an object containing all the attributes that
define a line including whether or not a check box should be on or off. So,
this is my next cognitive hurdle. How do I directly turn the checked attribute
on or off? or is it only possible using indirect means?
Code and templates available on request
---eric
More information about the Albatross-users
mailing list