Comments on: AJAX generic form parser /index.php/2006/07/07/ajax-generic-form-parser/ Helping newbies learn AJAX with Tutorials Sat, 08 Jan 2011 17:21:04 +0000 hourly 1 http://wordpress.org/?v=3.4 By: Jason /index.php/2006/07/07/ajax-generic-form-parser/#comment-12500 Jason Mon, 06 Oct 2008 00:46:45 +0000 /index.php/2006/07/07/ajax-generic-form-parser/#comment-12500 Nice tutorial. Could you do one on cross-domain AJAX methods? Nice tutorial. Could you do one on cross-domain AJAX methods?

]]>
By: manisha /index.php/2006/07/07/ajax-generic-form-parser/#comment-10279 manisha Fri, 12 Sep 2008 12:04:07 +0000 /index.php/2006/07/07/ajax-generic-form-parser/#comment-10279 hi , i just want to know, wat is rnd982g?? and why its is being used here ? hi ,

i just want to know, wat is rnd982g?? and why its is being used here ?

]]>
By: san koa /index.php/2006/07/07/ajax-generic-form-parser/#comment-4962 san koa Tue, 19 Aug 2008 09:45:23 +0000 /index.php/2006/07/07/ajax-generic-form-parser/#comment-4962 Please give some example of how to use ajax within detail mention. thank you in advanced for all developer fusion. regards, san Please give some example of how to use ajax within detail mention. thank you in advanced for all developer fusion.

regards,
san

]]>
By: cosminx /index.php/2006/07/07/ajax-generic-form-parser/#comment-4702 cosminx Wed, 23 Jul 2008 08:56:11 +0000 /index.php/2006/07/07/ajax-generic-form-parser/#comment-4702 Can you do a version for post method ? Can you do a version for post method ?

]]>
By: krrish /index.php/2006/07/07/ajax-generic-form-parser/#comment-87 krrish Mon, 31 Jul 2006 01:06:06 +0000 /index.php/2006/07/07/ajax-generic-form-parser/#comment-87 Thank you for your awesome contribution, this really helped me out alot....there isnt a single tutorial on web for Ajax that is any simpler or more useful then yours... I had to fix few errors on your javascript file before i could put this to any use. You did a great job on posting the form to any php file and also the few validations. I have enhanced it so you can display results where you want on a page... The new html tag to post the form would be: please check the new javascript file..... var req = createXMLHttpRequest(); function createXMLHttpRequest() { var ua; if(window.XMLHttpRequest) { try { ua = new XMLHttpRequest(); } catch(e) { ua = false; } } else if(window.ActiveXObject) { try { ua = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { ua = false; } } return ua; } var resultsPlace=""; function sendRequest(frm, file, place) { var rnd982g = Math.random(); var str = ""; str=getForm(frm); if(str) { req.open('GET', file+'?'+str+'&rnd982g='+rnd982g); resultsPlace = place; req.onreadystatechange = handleResponse; req.send(null); } return false; } function handleResponse() { if(req.readyState == 4){ var response = req.responseText; document.getElementById(resultsPlace).innerHTML = response; } } function getForm(fobj) { var str = ""; var ft = ""; var fv = ""; var fn = ""; var els = ""; for(var i = 0;i Thank you for your awesome contribution, this really helped me out alot….there isnt a single tutorial on web for Ajax that is any simpler or more useful then yours…

I had to fix few errors on your javascript file before i could put this to any use. You did a great job on posting the form to any php file and also the few validations. I have enhanced it so you can display results where you want on a page…

The new html tag to post the form would be:

please check the new javascript file…..

var req = createXMLHttpRequest();

function createXMLHttpRequest() {
var ua;
if(window.XMLHttpRequest) {
try {
ua = new XMLHttpRequest();
} catch(e) {
ua = false;
}
} else if(window.ActiveXObject) {
try {
ua = new ActiveXObject(“Microsoft.XMLHTTP”);
} catch(e) {
ua = false;
}
}
return ua;
}

var resultsPlace=”";

function sendRequest(frm, file, place) {
var rnd982g = Math.random();
var str = “”;
str=getForm(frm);
if(str) {
req.open(‘GET’, file+’?'+str+’&rnd982g=’+rnd982g);
resultsPlace = place;
req.onreadystatechange = handleResponse;
req.send(null);
}
return false;
}

function handleResponse() {
if(req.readyState == 4){
var response = req.responseText;
document.getElementById(resultsPlace).innerHTML = response;
}
}

function getForm(fobj) {
var str = “”;
var ft = “”;
var fv = “”;
var fn = “”;
var els = “”;
for(var i = 0;i

]]>