<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Indeed.<div><br><div>There is a bit of doc on this here:&nbsp;<a href="http://book.seaside.st/book/advanced/restful/request-response">http://book.seaside.st/book/advanced/restful/request-response</a></div><div>Although it’s in the context of REST, the #respond: method can be invoked in any request context (hence “self requestContext respond: [:response | … ]) to take low-level control on what Seaside should respond.</div><div>&nbsp;And there are methods on WAResponse to set the status code.</div><div><br></div><div>Cheers and happy new year!</div><div>Johan</div><div><br><div><div>On 31 Dec 2013, at 20:43, Bob Arning &lt;<a href="mailto:arning315@comcast.net">arning315@comcast.net</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
  
    <meta content="text/html; charset=ISO-8859-15" http-equiv="Content-Type">
  
  <div text="#000000" bgcolor="#FFFFFF">
    <font face="Georgia">Well, just trying things a bit, this seems to
      work:<br>
      <br>
      "===================="<br>
      &nbsp;&nbsp;&nbsp; html div<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; onClick: (html jQuery ajax <br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; callback: [ :val |<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; val inspect.<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; self requestContext respond: [ :response |<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; response <br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; contentType: 'text/json' seasideMimeType;<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nextPutAll: {'what arrived was'. val}
      asJson<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ]<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ]<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; value: (JSStream on: 'this.innerHTML')<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; );<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; with: 't2'.<br>
      "===================="<br>
      <br>
      Cheers,<br>
      Bob<br>
      <br>
    </font>
    <div class="moz-cite-prefix">On 12/31/13 9:30 AM,
      <a class="moz-txt-link-abbreviated" href="mailto:jtuchel@objektfabrik.de">jtuchel@objektfabrik.de</a> wrote:<br>
    </div>
    <blockquote cite="mid:52C2D4F6.6090909@objektfabrik.de" type="cite">Hi
      again,
      <br>
      <br>
      thinking a bit more about my X-editable plans, I dug a bit deeper
      into JQAjax. Unfortunately, this gives me more questions than
      answers ;-)
      <br>
      <br>
      Say I have an ajax callback using jquery like this:
      <br>
      <br>
      html anchor
      <br>
      id: 'mylink';
      <br>
      onClick: (html jQuery&nbsp; ajax callback: [self doSomething]);
      <br>
      with: 'Click here'.
      <br>
      <br>
      <br>
      This callback will always respond with an empty HTTP response with
      status code 200, right?
      <br>
      There are other callback methods on JQAjax, like respond:, text:
      and so on.
      <br>
      <br>
      Is there any documentation on these?
      <br>
      <br>
      I am looking for a way to transport some value to a server-side
      callback block and respond with one of these two options:
      <br>
      <br>
      a) HTTP 200 and a JSON document with success information and
      probably an error message
      <br>
      b) HTTP 200 if the callback processed without errors, or a
      different HTTP code and some error text in the response's body if
      there is some error during processing the callback
      <br>
      <br>
      Has anybody done this? Any pointers to more details?
      <br>
      <br>
      Thanks in advance and happy new year to all Seasiders!
      <br>
      <br>
      Joachim
      <br>
      <br>
      <br>
    </blockquote>
    <br>
  </div>

_______________________________________________<br>seaside mailing list<br><a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br></blockquote></div><br></div></div></body></html>