The weblog of Joshua Eichorn, AJAX, PHP and Open Source
HTML_AJAX Info is now located at the HTML_AJAX wiki.
This page is sticking around since it has comments on it.
[...] This is a continuation of my AJAX Hello World series, in my earlier posts I covered sajax and JPSpan. In this article i’ll cover how to get a basic AJAX appliction up and running with HTML_AJAX. If you haven’t figured it out yet im one of the author’s of HTML_AJAX. The application in question is the same simple app as the other examples, it has an input box for adding random strings and an button to add a random one to a div. [...]
[...] http://blog.joshuaeichorn.com/html_ajax [...]
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.
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.
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?
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?
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.
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.
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 ?
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
i’m new to html_ajax,
i cant run the html_ajax examples,
would you please tell me how to settle the examples document
Johnson: I’ll need some more details to work things out. Feel free to use the mailing list of asking detailed questions. You’ll even get responses even when i’m not around.
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???
Gajendra: Just send an email like you normally would after you run move_uploaded_file
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
// this will catch error conditions
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);
Could I add Percent of the upload to it. If yes, how???
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
As below Syntax error while calling uploadprogressmeterstatus.get_status()
Please help me this is very urgent for me.
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?
Mail (will not be published) (required)
Theres no stoping pigeons
There and Back Again is proudly powered by
and Comments (RSS).