Comments on: Simple Ajax using Prototype. Part 1 /index.php/2006/11/29/simple-ajax-using-prototype-part-1/ Helping newbies learn AJAX with Tutorials Sat, 08 Jan 2011 17:21:04 +0000 hourly 1 http://wordpress.org/?v=3.3.1 By: Brij Bhushan /index.php/2006/11/29/simple-ajax-using-prototype-part-1/#comment-12364 Brij Bhushan Thu, 02 Oct 2008 07:17:54 +0000 /index.php/2006/11/29/simple-ajax-using-prototype-part-1/#comment-12364 good example good example

]]>
By: Brij Bhushan /index.php/2006/11/29/simple-ajax-using-prototype-part-1/#comment-12363 Brij Bhushan Thu, 02 Oct 2008 07:07:23 +0000 /index.php/2006/11/29/simple-ajax-using-prototype-part-1/#comment-12363 Very good example to learn basic functionality of AJAX Very good example to learn basic functionality of AJAX

]]>
By: lidador /index.php/2006/11/29/simple-ajax-using-prototype-part-1/#comment-4691 lidador Tue, 10 Jun 2008 00:12:26 +0000 /index.php/2006/11/29/simple-ajax-using-prototype-part-1/#comment-4691 Seems this doesn't work on FF. It looks like the ajax call is being kicked off by a popup window and it updates a row on the main page. The problem is that the popup page was refreshing before the ajax call was complete, somehow causing the response to be empty. To fix it I have tried to put the function call inside a setTimeout. function callback() { setTimeout('ajaxRequest()' ,10); } function delay_ajax() { ajaxRequest('parse.php', 'val='+$F('myval')); } and, of course: ... but didn't work also :( Any help?! Seems this doesn’t work on FF. It looks like the ajax call is being kicked off by a popup window and it
updates a row on the main page. The problem is that the popup page was refreshing before the ajax call was complete, somehow causing the response to be empty. To fix it I have tried to put the function call inside a setTimeout.

function callback() {
setTimeout(‘ajaxRequest()’ ,10);
}

function delay_ajax() {
ajaxRequest(‘parse.php’, ‘val=’+$F(‘myval’));
}

and, of course:

… but didn’t work also :( Any help?!

]]>
By: banjojim /index.php/2006/11/29/simple-ajax-using-prototype-part-1/#comment-201 banjojim Sun, 28 Jan 2007 00:36:17 +0000 /index.php/2006/11/29/simple-ajax-using-prototype-part-1/#comment-201 I'm running your example but the return value is the following: if(isset($_GET[�val�])) { echo �You entered: �.$_GET[�val�]; } It seems like PHP isn't parsing the script. I know PHP is working because php phpinfo() works fine. Any suggestions? I'm sure it's a PHP problem but I'm not sure how to continue. I’m running your example but the return value is the following:

if(isset($_GET[�val�])) { echo �You entered: �.$_GET[�val�]; }

It seems like PHP isn’t parsing the script. I know PHP is working because php phpinfo() works fine. Any suggestions? I’m sure it’s a PHP problem but I’m not sure how to continue.

]]>
By: Stuart /index.php/2006/11/29/simple-ajax-using-prototype-part-1/#comment-200 Stuart Wed, 24 Jan 2007 23:12:33 +0000 /index.php/2006/11/29/simple-ajax-using-prototype-part-1/#comment-200 beachbumdrums, I'm not to sure why you get this error. If possible can you run it with FF2 with the Firebug extension? this will give you a better indication of where exactly the error is coming from. Also, I do not know if this makes any difference, but try changing the ` (funny single quotes which wordpress generates) to proper single quotes. Sometime wordpress changes the code a little. Finally you could take out the F() function, and place: < input type="button" value="GO" onClick="ajaxRequest('parse.php', 'val='+document.getElementById('myval').value)" > Good luck. beachbumdrums,

I’m not to sure why you get this error. If possible can you run it with FF2 with the Firebug extension? this will give you a better indication of where exactly the error is coming from.

Also, I do not know if this makes any difference, but try changing the ` (funny single quotes which wordpress generates) to proper single quotes. Sometime wordpress changes the code a little.

Finally you could take out the F() function, and place:
< input type="button" value="GO" onClick="ajaxRequest('parse.php', 'val='+document.getElementById('myval').value)" >

Good luck.

]]>