21 thoughts on “HTML_AJAX”

  1. Pingback: There and Back Again » Blog Archive » AJAX Hello World with HTML_AJAX

  2. Pingback: Подробно » AJAX

  3. Hello Josh, first of all, big thumbs up for phpDocumentor, i use it a lot! With 4 years of PHP experience i wanna dive into AJAX. I found XAJAX to be quite nice, but the project seems dead.

    To be honest i want to use AJAX in a custom build application for form submission and to update html content in a list of returned records. For this, XAJAX does the trick. However, as i stated, the project “seems” dead because the project is ran by someone who is very very busy. When i looked further on the internet, especially conserning the PHP upload patch, i came to your site.

    I really don’t know if i need to go and try HTML_AJAX or JSpan (which site is down atm due to SF tricks), or if i could still use XAJAX.

    It would really help me if you would like to give an objective opinion about the 3 librarys, and comment if I could use HTML_AJAX for that what i want to do.

  4. Gilles,

    All 3 libraries will work for your situation. In CVS HTML_AJAX even has code for doing fake form submission over ajax.

    Now as far as a project being alive thats a harder call. One of the reasons I created HTML_AJAX was because JPSpan was pretty much dead as far as new development goes. I haven’t watched XAJAX enough to know if its dead or not but developer activity is always important when picking a library.

    I’m using HTML_AJAX for work so it will be getting quite bit of subsidized development from them in the next couple months.

  5. Hi Joshua,

    Thanx for your reply!
    – Any chance you can adjust the PHP upload script to use HTML_AJAX instead of JSPAN?
    – Any idea when the next version will be available?

  6. Joshua, I want to submit a form via HTML_AJAX, and return an array consisting of three elements:
    – one being a boolean stating wether the form is valid or not
    – an array of (error-) messages
    – an array of ID’s which i need to enable/change.

    Something like: http://www.backbase.com/postcode/

    Is that allready possible with the current version, and if so, can you post an example?

  7. Gilles:
    No clue on the upload stuff, it won’t take much but Its not a priority at the moment.

    For the form submission stuff all the backend work you need is there, but there is no actual glue code yet. Would you mind joining the mailing list so we can cover in detail what kind of api you would like to see. Will at least get it planed for a release from there.

  8. From xAjax’s web site: “xajax’s unique XML response / javascript message-pump system does the work for you, automatically handling the data returned from your functions and updating your content or state according to the instructions you return from your PHP functions. Because xajax does the work, you don’t have to write javascript callback handler functions.” Any chance you’ll be borrowing tips from their code any time soon? I like the idea of using a PEAR module rather than just random code that I have to throw around my server.

  9. Were planning on adding an ability like that, but no one is currently working on it. If you’d like to help out, even if its just fleshing out the feature request, join the mailing list.

  10. hi Joshua ,
    i will ask a small question :

    i have to pages and i want to move between these pages using ajax , can i do that ?


  11. AmmAr: I’m not sure what you mean

    You can load content from other pages into the current one using AJAX. The whole point is not to load a new page, if you want that just use a link a href

  12. hi joshua,
    i’m new to html_ajax,
    i cant run the html_ajax examples,
    would you please tell me how to settle the examples document

  13. Wow !!!

    That’s great. I have done that. Everything is working fine. I am uploading files and they are going right. I have a little problem. I want to send a confirmation mail to a specified mail about the file upload status, whether it has been uploaded or not. I am using move_uploaded_file function. Could you help me please???

  14. Hi Joshua,
    Thanks for your reply.
    Could you tell me how to install it on shared hosting???
    What if the file did not upload successfully. It still shows message “Uploaded successfully”. and where to use email sending code???

    This is the code from demo.php


    if ($fileWidget->uploadComplete())
    // output javascript to the iframe to send a final status to the main window
    // this will catch error conditions
    echo $fileWidget->finalStatus();

    function upload_file()


    File Transfer at $gmainurl

    Your file named $filename has been uploaded to $gmainurl

    if (move_uploaded_file($img_tmp_name, “$mydir/$filename”))
    die(“Can’t copy File. “);

    // mail upload status;
    $headers = ‘MIME-Version: 1.0’ . “\r\n”;
    $headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “\r\n”;
    $subject = “File transfer at $gmainurl”;
    //$headers .= “From: $email” . “\r\n”;

    @mail($_POST[“email”], $subject, $message, $headers);


  15. On the error messages it depends on what the error is, some are hard to trap, it may be worth looking at the code to see what can be improved.

    To get a percent status you need to be running on php 5.2 and have a upload status extension or you need to patch php and have an upload status extension

  16. I tried your script for displaying bar while uploading the file but i am going to Javascript error message

    As below Syntax error while calling uploadprogressmeterstatus.get_status()

    Please help me this is very urgent for me.

    Thank you

  17. Hi Joshua,

    Have you ever tried to use HTML_AJAX with Google Gears. In particular File upload and blobs? I really want to use HTML_AJAX with blob but seems blobs don’t get passed. Do you think this will work?


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.