title: Streaming json to a javascript function in Seaside
body: <p>I want to run a function jQuery style on page load that parses some json from the server, then intermittently parses more json. I'm new to Seaside so I'm having trouble finding an example to follow. </p>
  
  <p>I have a subclass of WAComponent that's rendering my HTML + jQuery script fine, but I don't know how to get that to connect back to the server to get the json. </p>
  
  <p>I made another subclass of WAComponent to serve the json (response contentType: 'application/json'), but it prepends <code>&lt;DOCTYPE...&lt;HTML...</code> to the json. My understanding is that this isn't the 'right' way to do things in Seaside anyway, and that callbacks are preferred, but all the examples given are of trivial anchor callbacks, whereas I need to trigger a callback from a script (jQuery onload) and return json in the response. Any pointers to an example would be greatly valued.</p>