Recommend this page to a friend!

      Simple AJAX  >  All threads  >  README  >  (Un) Subscribe thread alerts  
Summary:Instructions for use
Author:Er. Rochak Chauhan
Date:2005-11-24 02:56:51
Update:2009-05-22 19:13:05

  1. README   Reply   Report abuse  
Picture of Er. Rochak Chauhan Er. Rochak Chauhan - 2005-11-24 02:56:51
Fist of all.. I am asuming you have a Javascript enabled
browser (like Internet Explorer 6 , Firefox 1.0.6 or Opera 8)
Another thing..your server supports php.

Now create a php file (say test.php) and write the following code. Do keep it along with the ajax class(

$ajax = new Ajax('displayResponse');

<span id="displayResponse">No response...</span>

As you see "No Response" is the default message, Now what ever is
written/returned in serverfile.php wil be displayed instead of "No

  2. Re: README   Reply   Report abuse  
Picture of Kevin Smith Kevin Smith - 2005-11-25 23:20:58 - In reply to message 1 from Er. Rochak Chauhan
In both IE6 and Firefox I got the following error:

Error: document.getElementById(objectId) has no properties
Source File:
Line: 52

This is using the example.php file. Tried to use the following example lines and both fail:

$ajax->sendRequest('serverfile.php', $paramNames, $paramValues);

Any chance of a fix for this?



  3. Re: README   Reply   Report abuse  
Picture of Nico Bijl Nico Bijl - 2008-11-08 19:13:56 - In reply to message 1 from Er. Rochak Chauhan
hi rochak, i also have a little problem with my script, a different problem though... Also i change it but i think the solution should be the same if i didnt change the scripts, here my problem:

I want to sent some data, (for form validation)

my function i like this:
function sendReq(serverFileName, divId, variableNames, variableValues) {

this is where i call the function:
sendReq('include/ajaxart.php', 'submit', 'submit, value', this.value, 'doei')

well as you maybe see the problem is with the quoting. The values of the variableValues will be the this.value and some random text. but now i dont know how to quote the this.value code because it only works nonquoted

so maybe i should use an array??? if yes how? how can i make sure the this.value code still works even in an array?

Please help!!!



  4. Re: README   Reply   Report abuse  
Picture of JOhny JOhny - 2009-05-22 19:13:05 - In reply to message 1 from Er. Rochak Chauhan
Is there easy way to create more DisplayResponses?

I really like your class - it is easy to understand, but when i want to have more than one ajax result on page > there is this problem... I dont know how i can create more than one DisplayResponse...


For more information send a message to info at phpclasses dot org.