I've read the prior discussion on using cross domain get with callback, very
nice but now we have something "simpler", a POST on the same domain, i.e.
http://localhost:8080.

I have a simple document rendered with (html), (app) and (action) are
absent. I don't want to use them at all since I'm using cookies with unique
ids to keep track of people.

I load the following JS in the document rendered on the first call to
main.l:

$(document).ready(function(){
  $(".articles_link").css('cursor', 'pointer').click(function(){
    $.post("@ajaxTest", {Test: "test"}, function(res){
      $(".middle_content").html(res);
    });
  });
});

The above code works according to plan, when a "link" is clicked Firebug
shows a POST being sent to http://localhost:8080/@ajaxTest with the correct
contents. The server never sends anything back though, no reply, the simple
test function looks like this:

(de ajaxTest ()
  (httpHead "text/plain; charset=utf-8")
  (ht:Out T
     (ht:Prin "From Pico")))

Is correct handling of a POST dependent on the session logic in the GUI
framework or am I doing something else wrong?

------=_Part_125738_8012937.1222331064850
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div dir="ltr">I&#39;ve read the prior discussion on using cross domain get 
with callback, very nice but now we have something &quot;simpler&quot;, a POST 
on the same domain, i.e. <a 
href="http://localhost:8080";>http://localhost:8080</a>.<br>
<br>I have a simple document rendered with (html), (app) and (action) are 
absent. I don&#39;t want to use them at all since I&#39;m using cookies with 
unique ids to keep track of people.<br><br>I load the following JS in the 
document rendered on the first call to main.l:<br>
<br>$(document).ready(function(){<br>&nbsp; 
$(&quot;.articles_link&quot;).css(&#39;cursor&#39;, 
&#39;pointer&#39;).click(function(){<br>&nbsp;&nbsp;&nbsp; 
$.post(&quot;@ajaxTest&quot;, {Test: &quot;test&quot;}, 
function(res){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$(&quot;.middle_content&quot;).html(res);<br>
&nbsp;&nbsp;&nbsp; });<br>&nbsp; });<br>});<br><br>The above code works 
according to plan, when a &quot;link&quot; is clicked Firebug shows a POST 
being sent to <a 
href="http://localhost:8080/@ajaxTest";>http://localhost:8080/@ajaxTest</a> with 
the correct contents. The server never sends anything back though, no reply, 
the simple test function looks like this:<br>
<br>(de ajaxTest ()<br>&nbsp; (httpHead &quot;text/plain; 
charset=utf-8&quot;)<br>&nbsp; (ht:Out T<br>&nbsp;&nbsp;&nbsp;&nbsp; (ht:Prin 
&quot;From Pico&quot;)))<br><br>Is correct handling of a POST dependent on the 
session logic in the GUI framework or am I doing something else wrong?<br>
<br></div>

------=_Part_125738_8012937.1222331064850--
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Reply via email to