Alex realized that the problem is a missing newline at the end of the
post string today. I've covered the solution over here:
http://www.prodevtips.com/2008/10/06/jquery-and-pico-lisp/
Maybe not the most elegant one, but orders of magnitude better than
actually changing the jQuery core.
/Henrik
I don't know what I might have done the last time when I got that result
after 7 minutes, it did not happen this time, I'm using a different version
of Firefox and Firebug this time though.
Anyway this time I traced line also, here is the result I get immediately
after making the jQuery post:
I just downloaded the newest version from http://jquery.com and tried it as
is, no zipping or packing, same result, here is the $.post function:
post: function( url, data, callback, type ) {
if ( jQuery.isFunction( data ) ) {
callback = data;
data = {};
I want to explain why this is important for me and should be important for
all.
Obviously the Pico server can play nicely with Ajax calls, the form.js is an
example of this, however it's heavily bound to the GUI framework, there
might be many different reasons however to communicate with the
Hi Henrik,
The above works flawlessly with Apache + PHP.
Surely jQuery will do that right, but still I do not understand where
the problem might lie in the PicoLisp server.
The tracing definitely shows that the HTTP header arrives, but the
following POST data (a single line) don't. The
On Sun, Oct 05, 2008 at 02:41:33PM +0700, Henrik Sarvell wrote:
http : 5
line :
line = (P O S T / @ a j a x T e s t
H T T P / 1 . 1)
_htHead :
...
_htHead = NIL
line :
So this is exactly what I expected. Why does Firefox send the HTTP
header, but not the following
If the above simple example is not working either for for instance Alex
maybe? Then obviously something needs to be changed in either jQuery or the
Pico server to make them play well, the question is where and what and which
needs fewest changes? Unfortunately I'm sorely lacking in all areas
I just did a very basic test, the javascript:
function ajaxFunction(){
var xmlHttp;
try{
xmlHttp = new XMLHttpRequest();
}catch (e){
try{
xmlHttp = new ActiveXObject(Msxml2.XMLHTTP);
}catch (e){
try{
xmlHttp = new ActiveXObject(Microsoft.XMLHTTP);
Hi Henrik,
The above works just fine, however when changing the GET to POST I run
in to the same stalling problem as I did before. Is there a reason why
xmlHttp.open(GET, http://localhost/@ajaxTest;, true);
xmlHttp.send(null);
When you changed GET to POST, did you also make sure to
I just changed the original example to:
$(document).ready(function(){
$(.articles_link).css('cursor', 'pointer').click(function(){
$.get(@ajaxTest, {jquerytest: test}, function(res){
$(.middle_content).html(res);
});
});
});
Not surprisingly it works too, the only difference is
Yes it does, but when changing the ajaxTest function to:
(de ajaxTest ()
(httpHead text/plain; charset=utf-8)
(ht:Out T
(ht:Prin (pack Result: (get 'jquerytest 'http)
I only get Result: in the alert box, and firebug does not show any POST
variables at all either.
Disregard my prior post, I had forgotten to change the GET to POST.
--=_Part_47580_21775726.1223270082765
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
div dir=ltrDisregard my prior post, I had forgotten to change the GET to
I'm still getting exactly the same problem, it just stalls without returning
anything, ie Response: Loading... in Firebug.
As far as I know this should simply work in the same way a POSTed form does,
I know you use Ajax in the JS form logic so there is nothing in the Pico
server that is stopping
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
Hi Henrik,
nice but now we have something simpler, a POST on the same domain, i.e.
http://localhost:8080.
I observed similar problems when sending a POST to the lib/form.l
framework. There it works, however, because that framework falls back to
a (non-Ajax) HTTP-POST when the first try fail.
15 matches
Mail list logo