Way too much HTML_AJAX and stupid Opera

I've been doing a LOT of work on the pear HTML_AJAX project. I'm usually not a big fan of pear but it's nice not to have to write everything. For the last release I tried to pin down a serializer that provides an api similiar to xajax and others - the "write no javascript - I do php" that makes ajax easy to use. It released with several LARGE bugs (impatient people), but they're all fixed in svn. I did a tutorial on how to use the current features and an extensive guestbook example that's included in the package (get the one in svn - the old one wasn't much fun).

I still have some work to do, namely adding class support in addition to id support for all the HTML_AJAX_Action methods, and perhaps adding a few more features to the system. I'm currently thinking of an insertConfirm but I need other people's opinions on the matter. My next big project for HTML_AJAX is getting HTML_AJAX_Helper where it needs to be. Action is designed to be used by the ajax callback - it's sending data back to the page. The helper class sets up the initial javascript links and lines and a lot more needs to be added. After that I'm moving on to iframe ajax fallback and support for file uploads and rich text editors. At that point HTML_AJAX will be all that I need - I may help out with some polling features but that's about it. Then will come the fun of integrating it with Kalfu.

I'll either have to find some way to install a local pear (not something I want to do) or I'll have to bundle a version(always fun for updates and bugfixes). But I suppose I'll need to php5 it anyway so it won't kill me.

Opera turned out to be a REAL headache. When Opera gets a Content-Type header it doesn't understand - instead of leaving the data as is it like...I don't know...turns it to a binary file or something? In any case the information becomes horribly garbled. The problem is HTML_AJAX uses Content-Type to decide what serializer/unserializers to use on the data. So opera gets a BIG FAT HACK that detects window.opera (always present on 7.6+ - which is when xmlHttpRequest support was introducted anyway) and changes the content-type to text/plain and adds an x-content-type header with the real type to use. What a mess! I reported a bug but it's not like I can track it or anything. You'd think they'd at least let you see your own bugs... Ok, enough of the opera rant. I'm sure that other browsers will introduce weird strange bugs that boggle the mind, but so far everything's working for me.

Comments

Be the first to write a comment!

Post a Reply