[Seaside] Checkbox with JQuery

janus janus1859 at googlemail.com
Wed May 23 12:36:29 UTC 2012


Hello,
I would like to use a checkbox with JQuery. How is it possible to use the
onchange-event to show the checked-status of the checkbox.
This is my approach so far:

/renderCheckBoxFor: eachAccount on: html
	| ID parentID checkBox |
	parentID := html nextId.
	ID := html nextId.
	html div
		id: parentID;
		with: [ 
					html label
						for: ID;
						with: 'CheckBox: '.
					html checkbox
						id: ID;
						value: checkBox;
						callback: [ :value | checkBox := value ];
						onChange:
								(html jQuery ajax
										callback: [ :value | Transcript show: value; cr ]
										value:
											(html jQuery this
												parent: '#' , parentID;
												find: ('#', ID)) serialize) ]./
	html break

--
View this message in context: http://forum.world.st/Checkbox-with-JQuery-tp4631550.html
Sent from the Seaside General mailing list archive at Nabble.com.


More information about the seaside mailing list