[Seaside] How to combine serialize and a load.
Timothy James Ziebart
timothy at churchmilitant.org
Sat Jan 30 09:03:48 UTC 2010
In the following code I am trying to accomplish two things. Update the
contents of "model region" on the server using serializeThis and then
render a div on the page using load. I cannot get them to work
together. The serializeThis or load with the onChange: message works
fine alone but when I try to combine them I don't get the behavior I am
expecting. Any suggestions? Note the page element being loaded is not
the same as the select.
id: html nextId;
list: (self session findCodeByParent: 'region' type: 'region');
selected: model region;
callback: [ :value | self regionSelectionChanged: value ];
onChange: (html jQuery ajax serializeThis);
onAjaxComplete: ((html jQuery id: 's_results' ) load
html: [: r | self renderResultsOn: r]).
More information about the seaside